summaryrefslogtreecommitdiffstats
path: root/progress.py
diff options
context:
space:
mode:
Diffstat (limited to 'progress.py')
-rw-r--r--progress.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/progress.py b/progress.py
index 31a4890a..30ec8c3b 100644
--- a/progress.py
+++ b/progress.py
@@ -119,6 +119,11 @@ class Progress:
119 if not quiet and show_elapsed: 119 if not quiet and show_elapsed:
120 self._update_thread.start() 120 self._update_thread.start()
121 121
122 def update_total(self, new_total):
123 """Updates the total if the new total is larger."""
124 if new_total > self._total:
125 self._total = new_total
126
122 def _update_loop(self): 127 def _update_loop(self):
123 while True: 128 while True:
124 self.update(inc=0) 129 self.update(inc=0)