Sleep only in case if some tasks are not finished

This commit is contained in:
Dmitry Shulyak 2015-10-13 14:14:52 +03:00
parent b407d83941
commit 6aa2ef3827

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('')