[diffoscope] 06/06: diffoscope.main: Seed the initial progress bar with the first specified argument.
Chris Lamb
chris at chris-lamb.co.uk
Wed Dec 28 19:40:02 CET 2016
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository diffoscope.
commit 0c245b591d3bf7d47250795863affb858e6b4346
Author: Chris Lamb <lamby at debian.org>
Date: Wed Dec 28 18:33:18 2016 +0000
diffoscope.main: Seed the initial progress bar with the first specified argument.
Signed-off-by: Chris Lamb <lamby at debian.org>
---
diffoscope/main.py | 2 +-
diffoscope/progress.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/diffoscope/main.py b/diffoscope/main.py
index a827e47..97369fe 100644
--- a/diffoscope/main.py
+++ b/diffoscope/main.py
@@ -247,7 +247,7 @@ def run_diffoscope(parsed_args):
parsed_args.text_output = "-"
logger.debug('Starting comparison')
ProgressManager().setup(parsed_args)
- with Progress(1):
+ with Progress(1, parsed_args.path1) as p:
difference = compare_root_paths(
parsed_args.path1, parsed_args.path2)
ProgressManager().finish()
diff --git a/diffoscope/progress.py b/diffoscope/progress.py
index 61e6e7d..bbb7d62 100644
--- a/diffoscope/progress.py
+++ b/diffoscope/progress.py
@@ -69,11 +69,11 @@ class ProgressManager(object):
x.finish()
class Progress(object):
- def __init__(self, total):
+ def __init__(self, total, msg=""):
self.current = 0
self.total = total
- ProgressManager().new_total(total, "")
+ ProgressManager().new_total(total, msg)
def __enter__(self):
return self
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list