diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-04-09 15:55:17 -0700 |
---|---|---|
committer | Chris Larson <chris_larson@mentor.com> | 2010-04-09 15:59:08 -0700 |
commit | 17c414d0c050c42d4beb3f1dd84573020aacb392 (patch) | |
tree | e3097e2f5b7187a5dc8522c6a1602783ce099a7f /lib/bb/msg.py | |
parent | 7d00bab300961431f9960cf6759966f608580bc0 (diff) | |
download | bitbake-contrib-17c414d0c050c42d4beb3f1dd84573020aacb392.tar.gz |
Immediately display messages if no UI handlers are installed yet
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib/bb/msg.py')
-rw-r--r-- | lib/bb/msg.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/bb/msg.py b/lib/bb/msg.py index 3fcf7091b..9cb1d4c14 100644 --- a/lib/bb/msg.py +++ b/lib/bb/msg.py @@ -101,25 +101,34 @@ def debug(level, domain, msg, fn = None): domain = 'default' if debug_level[domain] >= level: bb.event.fire(MsgDebug(msg), None) + if not bb.event._ui_handlers: + print 'DEBUG: ' + msg def note(level, domain, msg, fn = None): if not domain: domain = 'default' if level == 1 or verbose or debug_level[domain] >= 1: bb.event.fire(MsgNote(msg), None) + if not bb.event._ui_handlers: + print 'NOTE: ' + msg def warn(domain, msg, fn = None): bb.event.fire(MsgWarn(msg), None) + if not bb.event._ui_handlers: + print 'WARNING: ' + msg def error(domain, msg, fn = None): bb.event.fire(MsgError(msg), None) - print 'ERROR: ' + msg + if not bb.event._ui_handlers: + print 'ERROR: ' + msg def fatal(domain, msg, fn = None): bb.event.fire(MsgFatal(msg), None) - print 'FATAL: ' + msg + if not bb.event._ui_handlers: + print 'FATAL: ' + msg sys.exit(1) def plain(msg, fn = None): bb.event.fire(MsgPlain(msg), None) - + if not bb.event._ui_handlers: + print msg |