Skip to content

Commit

Permalink
Fixed edge-case for loops with very little time remaining
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-genson committed Mar 31, 2022
1 parent b00f897 commit 387a0f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion progresslogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def _calculate_estimate(self):
if days: estimate_string += f"{days} {'days' if days != 1 else 'day'}, "
if hours: estimate_string += f"{hours} {'hours' if hours != 1 else 'hour'}, "
if minutes: estimate_string += f"{minutes} {'minutes' if minutes != 1 else 'minute'}, "
if seconds: estimate_string += f"{seconds} {'seconds' if seconds != 1 else 'second'}, "
if seconds or not estimate_string: estimate_string += f"{seconds} {'seconds' if seconds != 1 else 'second'}, "

return estimate_string[:-2] # remove trailing comma & space

Expand Down

0 comments on commit 387a0f6

Please sign in to comment.