From: Chris Larson Date: Tue, 28 Dec 2010 17:02:49 +0000 (-0700) Subject: bb.debug: handle caller not passing a debug level X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d68a4e7ccf576cde38a9569e328341375bc8bc4e;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bb.debug: handle caller not passing a debug level This is a compatibility measure, as previous versions did not error out when this occurred, and will most likely be dropped in the next bitbake minor version in favor of a fatal error. Signed-off-by: Chris Larson --- diff --git a/lib/bb/__init__.py b/lib/bb/__init__.py index f8577c6794c..3e75abd28b5 100644 --- a/lib/bb/__init__.py +++ b/lib/bb/__init__.py @@ -76,6 +76,10 @@ def plain(*args): logger.plain(''.join(args)) def debug(lvl, *args): + if isinstance(lvl, basestring): + logger.warn("Passed invalid debug level '%s' to bb.debug", lvl) + args = (lvl,) + args + lvl = 1 logger.debug(lvl, ''.join(args)) def note(*args):