Commit 7474c948 authored by Stavros Sachtouris's avatar Stavros Sachtouris
Browse files

Fix typo in file upload

parent d65d838e
......@@ -729,21 +729,23 @@ 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,
**restargs)
end = total_size - 1 if (
key + blocksize > total_size) else key + blocksize - 1
data_range = _range_up(key, end, total_size, filerange)
if not data_range:
self._cb_next()
continue
restargs[
'async_headers'] = {'Range': 'bytes=%s' % data_range}
flying[key] = self._get_block_async(obj, **restargs)
blockid_dict[key] = unsaved
self._watch_thread_limit(flying.values())
self._thread2file(
flying, blockid_dict, local_file, offset,
**restargs)
end = total_size - 1 if (
key + blocksize > total_size) else key + blocksize - 1
if end < key:
self._cb_next()
continue
data_range = _range_up(key, end, total_size, filerange)
if not data_range:
self._cb_next()
continue
restargs[
'async_headers'] = {'Range': 'bytes=%s' % data_range}
flying[key] = self._get_block_async(obj, **restargs)
blockid_dict[key] = unsaved
for thread in flying.values():
thread.join()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment