[diffoscope] 04/05: diffoscope.presenters.html: Invert logic as we use unconditional control flow.

Chris Lamb chris at chris-lamb.co.uk
Thu Jan 11 09:59:48 UTC 2018


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

lamby pushed a commit to branch master
in repository diffoscope.

commit 720305c7bc9f295f235808dbfa956729da8bb69d
Author: Chris Lamb <lamby at debian.org>
Date:   Thu Jan 11 12:48:11 2018 +0530

    diffoscope.presenters.html: Invert logic as we use unconditional control flow.
---
 diffoscope/presenters/html/html.py | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/diffoscope/presenters/html/html.py b/diffoscope/presenters/html/html.py
index 14b9f03..46a1e1b 100644
--- a/diffoscope/presenters/html/html.py
+++ b/diffoscope/presenters/html/html.py
@@ -645,13 +645,14 @@ class HTMLPresenter(Presenter):
                     footer = output_footer()
                     # we hit a limit, either max-report-size or single-page
                     if not make_new_subpage:
-                        if not outputs:
-                            # no more holes, don't traverse any more nodes
-                            raise StopIteration
-                        else:
-                            # True = don't traverse this node's children, because they won't be output
-                            # however there are holes in other pages, so don't break the loop just yet
+                        if outputs:
+                            # True = don't traverse this node's children,
+                            # because they won't be output however there are
+                            # holes in other pages, so don't break the loop
+                            # just yet
                             return True
+                        # No more holes, don't traverse any more nodes
+                        raise StopIteration
                 else:
                     # Unconditionally write the root node regardless of limits
                     assert node is root_difference

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