diff options
author | Jose Quaresma <quaresma.jose@gmail.com> | 2022-09-19 09:13:11 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-09-21 20:20:22 +0100 |
commit | e2c3bd1638cfe32d465523aec2d6d6d3b024e1eb (patch) | |
tree | 2090f24c1c973675aeaf99b99824f7f1da749735 /bitbake/lib/bb/__init__.py | |
parent | 3e0e5347e6b34d1e3535edeb45582a7480a4c298 (diff) | |
download | poky-e2c3bd1638cfe32d465523aec2d6d6d3b024e1eb.tar.gz |
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 <jose.quaresma@foundries.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/__init__.py')
-rw-r--r-- | bitbake/lib/bb/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
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): | |||
60 | return | 60 | return |
61 | if loglevel < bb.msg.loggerDefaultLogLevel: | 61 | if loglevel < bb.msg.loggerDefaultLogLevel: |
62 | return | 62 | return |
63 | |||
64 | if not isinstance(level, int) or not isinstance(msg, str): | ||
65 | mainlogger.warning("Invalid arguments in bbdebug: %s" % repr((level, msg,) + args)) | ||
66 | |||
63 | return self.log(loglevel, msg, *args, **kwargs) | 67 | return self.log(loglevel, msg, *args, **kwargs) |
64 | 68 | ||
65 | def plain(self, msg, *args, **kwargs): | 69 | def plain(self, msg, *args, **kwargs): |