[diffoscope] 08/12: Extend hiding metadata to json output.

Maria Glukhova siamezzze-guest at moszumanska.debian.org
Wed Mar 8 14:59:09 UTC 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 e5b5a5f647ac10caa6c4934b45fbfd31c1188d47
Author: Maria Glukhova <siamezzze at gmail.com>
Date:   Tue Feb 7 03:59:33 2017 +0200

    Extend hiding metadata to json output.
---
 diffoscope/presenters/json.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/diffoscope/presenters/json.py b/diffoscope/presenters/json.py
index bf4d39e..1df4e30 100644
--- a/diffoscope/presenters/json.py
+++ b/diffoscope/presenters/json.py
@@ -21,6 +21,8 @@ import json
 
 from .utils import Presenter
 
+from diffoscope.config import Config
+
 
 class JSONPresenter(Presenter):
     def __init__(self, print_func):
@@ -36,6 +38,9 @@ class JSONPresenter(Presenter):
         self.print_func(json.dumps(self.root[0], indent=2, sort_keys=True))
 
     def visit_difference(self, difference):
+        if Config().hide_profile is not None and \
+                        difference.source1 == Config().hide_profile:
+            return
         self.current.append({
             'source1': difference.source1,
             'source2': difference.source2,

-- 
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