From e02f78e24eac146951ee620f8774a1b9dd072d71 Mon Sep 17 00:00:00 2001 From: Phuong Nguyen Date: Mon, 9 Dec 2019 15:13:43 +1100 Subject: [PATCH] Using boolean typing for while loop check instead of integer Signed-off-by: Phuong Nguyen --- helpers.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/helpers.py b/helpers.py index 17c0d87..f51cf47 100644 --- a/helpers.py +++ b/helpers.py @@ -317,10 +317,10 @@ def watch_tasks(task_list, ref_list, task_name, quiet): pending_list[task_id] = "true" # Loop through each task and check current status - do_loop = 1 + do_loop = True sleep_time = 10 failure = False - while do_loop == 1: + while do_loop: if len(task_list) >= 1: # Don't render progress bars if in quiet mode if not quiet: @@ -360,14 +360,14 @@ def watch_tasks(task_list, ref_list, task_name, quiet): pending_list[task_id] = "false" else: # All tasks are complete - end the loop - do_loop = 0 + do_loop = False sleep_time = 0 continue # Sleep for 10 seconds between checks time.sleep(sleep_time) else: - do_loop = 0 + do_loop = False print "ERROR (watchTasks): no tasks passed to us" # All tasks are complete if we get here.