Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
kamaki
Commits
43f798ab
Commit
43f798ab
authored
Dec 11, 2013
by
Stavros Sachtouris
Browse files
Fix bug w. 0 file syncing
parent
e44f33f7
Changes
1
Show whitespace changes
Inline
Side-by-side
kamaki/clients/pithos/__init__.py
View file @
43f798ab
...
...
@@ -66,9 +66,11 @@ def _range_up(start, end, max_value, a_range):
:returns: (str) a range string cut-off for the start-end range
an empty response means this window is out of range
"""
assert
start
>=
0
,
'_range_up was called with start < 0'
assert
end
>=
start
,
'_range_up was called with end < start'
assert
end
<=
max_value
,
'_range_up was called with max_value < end'
assert
start
>=
0
,
'_range_up called w. start(%s) < 0'
%
start
assert
end
>=
start
,
'_range_up called w. end(%s) < start(%s)'
%
(
end
,
start
)
assert
end
<=
max_value
,
'_range_up called w. max_value(%s) < end(%s)'
%
(
max_value
,
end
)
if
not
a_range
:
return
'%s-%s'
%
(
start
,
end
)
selected
=
[]
...
...
@@ -729,6 +731,7 @@ class PithosClient(PithosRestClient):
self
.
_cb_next
(
len
(
blockids
)
-
len
(
unsaved
))
if
unsaved
:
key
=
unsaved
[
0
]
if
key
:
self
.
_watch_thread_limit
(
flying
.
values
())
self
.
_thread2file
(
flying
,
blockid_dict
,
local_file
,
offset
,
...
...
@@ -739,7 +742,8 @@ class PithosClient(PithosRestClient):
if
not
data_range
:
self
.
_cb_next
()
continue
restargs
[
'async_headers'
]
=
{
'Range'
:
'bytes=%s'
%
data_range
}
restargs
[
'async_headers'
]
=
{
'Range'
:
'bytes=%s'
%
data_range
}
flying
[
key
]
=
self
.
_get_block_async
(
obj
,
**
restargs
)
blockid_dict
[
key
]
=
unsaved
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment