Revision e9c73313 kamaki/cli/commands/__init__.py
b/kamaki/cli/commands/__init__.py | ||
---|---|---|
177 | 177 |
assert max_threads > 0, 'invalid max_threads config option' |
178 | 178 |
self.client.MAX_THREADS = max_threads |
179 | 179 |
|
180 |
def _safe_progress_bar(self, msg, arg='progress_bar'): |
|
180 |
def _safe_progress_bar(self, msg, arg='progress_bar', timeout=False):
|
|
181 | 181 |
"""Try to get a progress bar, but do not raise errors""" |
182 | 182 |
try: |
183 | 183 |
progress_bar = self.arguments[arg] |
184 | 184 |
progress_bar.file = self._err |
185 |
gen = progress_bar.get_generator(msg) |
|
185 |
gen = progress_bar.get_generator(msg, timeout=timeout)
|
|
186 | 186 |
except Exception: |
187 | 187 |
return (None, None) |
188 | 188 |
return (progress_bar, gen) |
Also available in: Unified diff