Skip to content

Commit

Permalink
Merge pull request #63 from phuonghnguyenau/master
Browse files Browse the repository at this point in the history
Using boolean typing for while loop check instead of integer
  • Loading branch information
ozchrisishere authored Jun 4, 2020
2 parents 11f542b + e02f78e commit 0787058
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,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:
Expand Down Expand Up @@ -361,14 +361,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.
Expand Down

0 comments on commit 0787058

Please sign in to comment.