[diffoscope] 02/02: Guarantee to all progress observers that we will be processing something.

Chris Lamb chris at chris-lamb.co.uk
Thu Dec 8 18:25:06 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 d87bed378c4e855a54d63c8dc48df45704f660ea
Author: Chris Lamb <lamby at debian.org>
Date:   Thu Dec 8 18:24:53 2016 +0100

    Guarantee to all progress observers that we will be processing something.
    
    Signed-off-by: Chris Lamb <lamby at debian.org>
---
 diffoscope/main.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/diffoscope/main.py b/diffoscope/main.py
index 4275d76..8e6e304 100644
--- a/diffoscope/main.py
+++ b/diffoscope/main.py
@@ -34,7 +34,7 @@ from diffoscope import logger, VERSION, set_locale, clean_all_temp_files
 from diffoscope.exc import RequiredToolNotFound
 from diffoscope.config import Config
 from diffoscope.difference import Difference
-from diffoscope.progress import ProgressManager
+from diffoscope.progress import ProgressManager, Progress
 from diffoscope.presenters.html import output_html, output_html_directory, \
     JQUERY_SYSTEM_LOCATIONS
 from diffoscope.presenters.text import output_text
@@ -243,8 +243,9 @@ def run_diffoscope(parsed_args):
         parsed_args.text_output = "-"
     logger.debug('Starting comparison')
     ProgressManager().setup(parsed_args)
-    difference = diffoscope.comparators.compare_root_paths(
-        parsed_args.path1, parsed_args.path2)
+    with Progress(1);
+        difference = diffoscope.comparators.compare_root_paths(
+            parsed_args.path1, parsed_args.path2)
     ProgressManager().finish()
     retcode = 1 if difference else 0
     if not retcode and parsed_args.output_empty:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list