Merge pull request #256 from dshulyak/fix_sleep

Sleep only in case if some tasks are not finished
This commit is contained in:
Łukasz Oleś 2015-10-13 13:54:30 +02:00
commit 2528c1bb2a

View File

@ -64,7 +64,7 @@ def wait_report(uid, timeout, interval=3):
length = len(stringified_summary)
click.echo(stringified_summary, nl=False)
sys.stdout.flush()
if summary[states.PENDING.name] + summary[states.INPROGRESS.name] == 0:
if summary[states.PENDING.name] + summary[states.INPROGRESS.name] != 0:
time.sleep(interval)
except errors.SolarError as err:
click.echo('')