From 387a0f62d8c3ffe63105440d4ba1dfd444361c22 Mon Sep 17 00:00:00 2001 From: Michael Genson Date: Thu, 31 Mar 2022 15:02:01 -0500 Subject: [PATCH] Fixed edge-case for loops with very little time remaining --- progresslogger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/progresslogger.py b/progresslogger.py index 03c4b34..34a2ef7 100644 --- a/progresslogger.py +++ b/progresslogger.py @@ -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