From e2c3bd1638cfe32d465523aec2d6d6d3b024e1eb Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Mon, 19 Sep 2022 09:13:11 +0000 Subject: bitbake: lib/bb: warning when the debug message is invalid There are many messed up calls for the debug log, so is better to warm about this as they will not work as expected. The level need to be an integer and the msg a string. (Bitbake rev: c1d9c1d25ce36848040dc0ce182835e497ccbb82) Signed-off-by: Jose Quaresma Signed-off-by: Richard Purdie --- bitbake/lib/bb/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bitbake/lib/bb/__init__.py') diff --git a/bitbake/lib/bb/__init__.py b/bitbake/lib/bb/__init__.py index 6b470aa195..09fe817adc 100644 --- a/bitbake/lib/bb/__init__.py +++ b/bitbake/lib/bb/__init__.py @@ -60,6 +60,10 @@ class BBLoggerMixin(object): return if loglevel < bb.msg.loggerDefaultLogLevel: return + + if not isinstance(level, int) or not isinstance(msg, str): + mainlogger.warning("Invalid arguments in bbdebug: %s" % repr((level, msg,) + args)) + return self.log(loglevel, msg, *args, **kwargs) def plain(self, msg, *args, **kwargs): -- cgit v1.2.3-54-g00ecf