Commit 86fcbabe authored by Giorgos Korfiatis's avatar Giorgos Korfiatis

Merge pull request #102 from dimara/hotfix-0.13.2

Some further fixes wrt download
parents ffc3cf07 22dedcbf
......@@ -1365,7 +1365,8 @@ class file_download(_PithosContainer):
for r, l, resume in ret:
if r:
with open(l, 'rwb+' if resume else 'wb+') as f:
mode = 'rb+' if resume and path.exists(l) else 'wb+'
with open(l, mode) as f:
yield (r, f)
yield (r, l)
......@@ -1381,7 +1382,7 @@ class file_download(_PithosContainer):
progress_bar = None
for rpath, output_file in self._src_dst(local_path):
if not rpath:
if not rpath and not path.exists(output_file):
self.error('Create local directory %s' % output_file)
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