]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bb.debug: handle caller not passing a debug level
authorChris Larson <chris_larson@mentor.com>
Tue, 28 Dec 2010 17:02:49 +0000 (10:02 -0700)
committerChris Larson <chris_larson@mentor.com>
Wed, 29 Dec 2010 23:30:18 +0000 (16:30 -0700)
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 <chris_larson@mentor.com>
lib/bb/__init__.py

index f8577c6794cb8a1f931d0c12352a3e6e1c7d2575..3e75abd28b50a52f08eb7276d477a97f5a34ed79 100644 (file)
@@ -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):