Commit 26413b0d authored by Stavros Sachtouris's avatar Stavros Sachtouris
Browse files

Adjust to progress 1.2

parent 73bf1f64
......@@ -395,7 +395,8 @@ class ProgressBarArgument(FlagArgument):
if self.value:
return None
try:
self.bar = KamakiProgressBar()
self.bar = KamakiProgressBar(
message.ljust(message_len), max=timeout or 100)
except NameError:
self.value = None
return self.value
......@@ -406,12 +407,9 @@ class ProgressBarArgument(FlagArgument):
self.bar.phases = bar_phases
self.bar.bar_prefix = ' '
self.bar.bar_suffix = ' '
self.bar.max = timeout or 100
self.bar.suffix = '%(remaining)ds to timeout'
else:
self.bar.suffix = '%(percent)d%% - %(eta)ds'
self.bar.eta = timeout or 100
self.bar.message = message.ljust(message_len)
self.bar.start()
def progress_gen(n):
......
......@@ -1284,9 +1284,6 @@ class file_download(_pithos_container):
self.error('\nDownload canceled by user')
if local_path is not None:
self.error('to resume, re-run with --resume')
except Exception:
self._safe_progress_bar_finish(progress_bar)
raise
finally:
self._safe_progress_bar_finish(progress_bar)
......
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