[diffoscope] 02/02: presenters.utils: Fix behaviour of setting report maximums to zero (ie. no limits)

Chris Lamb chris at chris-lamb.co.uk
Wed Feb 8 00:40:38 CET 2017


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

lamby pushed a commit to branch master
in repository diffoscope.

commit aeb021a330feddb06fb8dfdef0179a6f819cae4e
Author: Chris Lamb <lamby at debian.org>
Date:   Wed Feb 8 12:26:09 2017 +1300

    presenters.utils: Fix behaviour of setting report maximums to zero (ie. no limits)
    
    Signed-off-by: Chris Lamb <lamby at debian.org>
---
 diffoscope/presenters/utils.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/diffoscope/presenters/utils.py b/diffoscope/presenters/utils.py
index 18b784d..688ece9 100644
--- a/diffoscope/presenters/utils.py
+++ b/diffoscope/presenters/utils.py
@@ -76,6 +76,9 @@ def make_printer(path):
 
 def create_limited_print_func(print_func, max_page_size):
     def limited_print_func(s, force=False):
+        if max_page_size == 0:
+            print_func(s)
+            return
         if not hasattr(limited_print_func, 'char_count'):
             limited_print_func.char_count = 0
         print_func(s)

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


More information about the diffoscope mailing list