From 146046bcda4e481cb221de59ac9858303d473fec Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Fri, 9 Apr 2010 15:55:17 -0700 Subject: Immediately display messages if no UI handlers are installed yet (Bitbake rev: 17c414d0c050c42d4beb3f1dd84573020aacb392) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/msg.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/bitbake/lib/bb/msg.py b/bitbake/lib/bb/msg.py index 3fcf7091be..9cb1d4c143 100644 --- a/bitbake/lib/bb/msg.py +++ b/bitbake/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 -- cgit v1.2.3