File no-badness-return.diff of Package rpmlint

Index: rpmlint.py
===================================================================
--- rpmlint.py.orig
+++ rpmlint.py
@@ -170,15 +170,19 @@ def main():
                 sys.stderr.write('(none): E: interrupted, exiting while scanning all packages\n')
                 sys.exit(2)
 
-        if printAllReasons():
-            sys.stderr.write('(none): E: badness %d exceeds threshold %d, aborting.\n' % (badnessScore(), badnessThreshold()))
-            sys.exit(66)
+        printAllReasons()
 
     finally:
         print "%d packages and %d specfiles checked; %d errors, %d warnings." \
               % (packages_checked, specfiles_checked,
                  printed_messages["E"], printed_messages["W"])
 
+    if (badnessThreshold() >= 0):
+        if badnessScore() >= badnessThreshold():
+            sys.stderr.write('(none): E: badness %d exceeds threshold %d, aborting.\n' % (badnessScore(), badnessThreshold()))
+            sys.exit(66)
+        sys.exit(0)
+
     if printed_messages["E"] > 0:
         sys.exit(64)
     sys.exit(0)
Index: Filter.py
===================================================================
--- Filter.py.orig
+++ Filter.py
@@ -101,10 +101,6 @@ def _diag_compare(x, y):
 
 
 def printAllReasons():
-    threshold = badnessThreshold()
-    if threshold < 0:
-        return False
-
     global _badness_score, _diagnostic
     _diagnostic.sort(_diag_compare)
     last_reason = ''
@@ -119,8 +115,6 @@ def printAllReasons():
     if Config.info and len(last_reason):
         printDescriptions(last_reason)
     _diagnostic = list()
-    return _badness_score > threshold
-
 
 _details = {}
 
openSUSE Build Service is sponsored by