flush output when watching tasks (based on suggestion by Jan Stancek)

see: https://bugzilla.redhat.com/show_bug.cgi?id=1060050
This commit is contained in:
Mike McLean 2014-02-28 15:48:49 -05:00
parent caddcd75ae
commit 257dd238f8

View file

@ -435,6 +435,7 @@ def watch_tasks(session,tasklist,quiet=False):
return
if not quiet:
print "Watching tasks (this may be safely interrupted)..."
sys.stdout.flush()
rv = 0
try:
tasks = {}
@ -467,6 +468,7 @@ def watch_tasks(session,tasklist,quiet=False):
display_task_results(tasks)
break
sys.stdout.flush()
time.sleep(options.poll_interval)
except (KeyboardInterrupt):
if tasks and not quiet: