[diffoscope] 01/01: Put the tool_required for colordiff in a more appropriate place

Ximin Luo infinity0 at debian.org
Tue Nov 29 22:11:11 CET 2016


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository diffoscope.

commit 01dc7bd9972035ea4d3c117185fa0ef4a96c7d74
Author: Ximin Luo <infinity0 at debian.org>
Date:   Tue Nov 29 22:10:57 2016 +0100

    Put the tool_required for colordiff in a more appropriate place
---
 diffoscope/main.py            | 3 +--
 diffoscope/presenters/text.py | 3 ++-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/diffoscope/main.py b/diffoscope/main.py
index e0c7d79..c0a7a46 100644
--- a/diffoscope/main.py
+++ b/diffoscope/main.py
@@ -30,7 +30,7 @@ import contextlib
 
 import diffoscope.comparators
 
-from diffoscope import logger, VERSION, set_locale, clean_all_temp_files, tool_required
+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
@@ -224,7 +224,6 @@ def maybe_set_limit(config, parsed_args, key):
         setattr(config, key, float("inf"))
 
 
- at tool_required('colordiff')
 def run_diffoscope(parsed_args):
     if not tlsh and Config().fuzzy_threshold != parsed_args.fuzzy_threshold:
         logger.warning('Fuzzy-matching is currently disabled as the "tlsh" module is unavailable.')
diff --git a/diffoscope/presenters/text.py b/diffoscope/presenters/text.py
index 6fffe24..0929f40 100644
--- a/diffoscope/presenters/text.py
+++ b/diffoscope/presenters/text.py
@@ -21,9 +21,10 @@
 import subprocess
 import sys
 
-from diffoscope import logger
+from diffoscope import logger, tool_required
 
 
+ at tool_required('colordiff')
 def print_difference(difference, print_func, color=False):
     if difference.comments:
         for comment in difference.comments:

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


More information about the diffoscope mailing list