mirror of
https://git.yoctoproject.org/poky
synced 2026-04-04 23:02:22 +02:00
Immediately display messages if no UI handlers are installed yet
(Bitbake rev: 17c414d0c050c42d4beb3f1dd84573020aacb392) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
committed by
Richard Purdie
parent
21a9692c7d
commit
146046bcda
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user