Skip to contentSkip to conversation

Paul Eggleton : bitbake/knotty: don't count errors as warnings in summary

PATCH [email protected] 2 participants 2 messages Jan 15, 2012

lore
Share & tools
lore
#0 lore raw
Module: bitbake.git
Branch: master
Commit: d242d6ca81dd83b2b13a3ac77ac4cd829a69cf83
URL:    http://git.openembedded.org/?p=bitbake.git&a=commit;h=d242d6ca81dd83b2b13a3ac77ac4cd829a69cf83
Author: Paul Eggleton <[email protected]>
Date:   Fri Jan 13 17:01:45 2012 +0000

bitbake/knotty: don't count errors as warnings in summary

The count of warnings being shown in the summary at the end was also including the number of errors.

---

 lib/bb/ui/knotty.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
lib/bb/ui/knotty.py +1 -1
index 0340619..5366386 100644
@@ -127,7 +127,7 @@ def main(server, eventHandler):
                 if event.levelno >= format.ERROR:
                     errors = errors + 1
                     return_value = 1
-                if event.levelno >= format.WARNING:
+                elif event.levelno == format.WARNING:
                     warnings = warnings + 1
                 # For "normal" logging conditions, don't show note logs from tasks
                 # but do show them if the user has changed the default log level to 
#1 lore raw
Quoted 10 lines · On Sun, Jan 15, 2012 at 3:15 AM, <[email protected]> wrote:
lib/bb/ui/knotty.py +0 -0
index 0340619..5366386 100644
@@ -127,7 +127,7 @@ def main(server, eventHandler):

                if event.levelno >= format.ERROR:
                    errors = errors + 1 return_value = 1
-                if event.levelno >= format.WARNING:
+                elif event.levelno == format.WARNING:

Just as an FYI, this could have remained as >=, given the elif fixes the error matching issue. It doesn't matter for us, as I don't think we have any message levels higher than warning but lower than error, but wanted to note it for future reference.

Signature · 1 line
Christopher Larson