[diffoscope] 05/06: diffoscope.progress: Always update the progress bar so we update the message.
Chris Lamb
chris at chris-lamb.co.uk
Wed Dec 28 18:40:01 UTC 2016
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository diffoscope.
commit 03b2e2a0c197a9ef6a1f0dc75ff0c61dc487d24c
Author: Chris Lamb <lamby at debian.org>
Date: Wed Dec 28 18:33:00 2016 +0000
diffoscope.progress: Always update the progress bar so we update the message.
Signed-off-by: Chris Lamb <lamby at debian.org>
---
diffoscope/progress.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/diffoscope/progress.py b/diffoscope/progress.py
index 6d53810..61e6e7d 100644
--- a/diffoscope/progress.py
+++ b/diffoscope/progress.py
@@ -54,8 +54,6 @@ class ProgressManager(object):
def step(self, delta=1, msg=""):
delta = min(self.total - self.current, delta) # clamp
- if not delta:
- return
self.current += delta
for x in self.observers:
@@ -108,7 +106,11 @@ class ProgressBar(object):
# Print the last `width` characters with an ellipsis.
return '…{}'.format(msg[-width + 1:])
- self.bar = progressbar.ProgressBar(widgets=(
+ class OurProgressBar(progressbar.ProgressBar):
+ def _need_update(self):
+ return True
+
+ self.bar = OurProgressBar(widgets=(
' ',
progressbar.Bar(),
' ',
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the Reproducible-commits
mailing list