[diffoscope] 07/12: Hide-profiles stores only one value (for now), so compare using "==", not "in".

Maria Glukhova siamezzze-guest at moszumanska.debian.org
Wed Mar 8 15:59:09 CET 2017


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

siamezzze-guest pushed a commit to branch siamezzze/hide-profiles-experiment
in repository diffoscope.

commit 02622a1294c917260c14c12f9c988c173792ae59
Author: Maria Glukhova <siamezzze at gmail.com>
Date:   Tue Feb 7 03:48:32 2017 +0200

    Hide-profiles stores only one value (for now), so compare using "==", not "in".
---
 diffoscope/presenters/html/html.py        | 2 +-
 diffoscope/presenters/markdown.py         | 2 +-
 diffoscope/presenters/restructuredtext.py | 2 +-
 diffoscope/presenters/text.py             | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/diffoscope/presenters/html/html.py b/diffoscope/presenters/html/html.py
index 205c906..f54daa6 100644
--- a/diffoscope/presenters/html/html.py
+++ b/diffoscope/presenters/html/html.py
@@ -440,7 +440,7 @@ def escape_anchor(val):
 
 def output_difference(difference, print_func, css_url, directory, parents):
     if Config().hide_profile is not None:
-        if difference.source1 in Config().hide_profile:
+        if difference.source1 == Config().hide_profile:
             logger.debug('output for %s is hidden', difference.source1)
             return
     logger.debug('html output for %s', difference.source1)
diff --git a/diffoscope/presenters/markdown.py b/diffoscope/presenters/markdown.py
index 34ffc46..6c6ad2c 100644
--- a/diffoscope/presenters/markdown.py
+++ b/diffoscope/presenters/markdown.py
@@ -29,7 +29,7 @@ class MarkdownTextPresenter(Presenter):
 
     def visit_difference(self, difference):
         if Config().hide_profile is not None and \
-                        difference.source1 in Config().hide_profile:
+                        difference.source1 == Config().hide_profile:
             return
         if difference.source1 == difference.source2:
             self.title(difference.source1)
diff --git a/diffoscope/presenters/restructuredtext.py b/diffoscope/presenters/restructuredtext.py
index 60becdd..e83cec7 100644
--- a/diffoscope/presenters/restructuredtext.py
+++ b/diffoscope/presenters/restructuredtext.py
@@ -31,7 +31,7 @@ class RestructuredTextPresenter(Presenter):
 
     def visit_difference(self, difference):
         if Config().hide_profile is not None and \
-                        difference.source1 in Config().hide_profile:
+                        difference.source1 == Config().hide_profile:
             return
         if difference.source1 == difference.source2:
             self.title(difference.source1)
diff --git a/diffoscope/presenters/text.py b/diffoscope/presenters/text.py
index 6e09d55..6ec878d 100644
--- a/diffoscope/presenters/text.py
+++ b/diffoscope/presenters/text.py
@@ -46,7 +46,7 @@ class TextPresenter(Presenter):
 
     def visit_difference(self, difference):
         if Config().hide_profile is not None and \
-                        difference.source1 in Config().hide_profile:
+                        difference.source1 == Config().hide_profile:
             return
         if self.depth == 0:
             self.output("--- {}".format(difference.source1))

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


More information about the diffoscope mailing list