diff options
author | Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> | 2021-03-14 17:33:13 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-03-15 21:47:36 +0000 |
commit | bec9ea7ab28a8dfad1a6010ca5c6ec691754748d (patch) | |
tree | 73e9ad01974f25e00b04cff86563a67213a10ae5 | |
parent | 53c30efec4099035d19e6717059dfceff8ff88fd (diff) | |
download | bitbake-contrib-bec9ea7ab28a8dfad1a6010ca5c6ec691754748d.tar.gz |
codeparser: Fix TypeError in bitbake debug mode
Commit 75f87db413 fixed the confusion between bitbake and python logger
but in codeparser still old method of setting debug level was used
causing TypeError, because debug level value was incorrectly returned
and assigned to event.msg.
| File "./bitbake/lib/bb/ui/knotty.py", line 660, in main
| event.msg = event.fn + ': ' + event.msg
| TypeError: can only concatenate str (not "int") to str
[YOCTO #14298]
Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/codeparser.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/bb/codeparser.py b/lib/bb/codeparser.py index 25a7ac69d..0cec452c0 100644 --- a/lib/bb/codeparser.py +++ b/lib/bb/codeparser.py @@ -212,9 +212,9 @@ class PythonParser(): funcstr = codegen.to_source(func) argstr = codegen.to_source(arg) except TypeError: - self.log.debug(2, 'Failed to convert function and argument to source form') + self.log.debug2('Failed to convert function and argument to source form') else: - self.log.debug(1, self.unhandled_message % (funcstr, argstr)) + self.log.debug(self.unhandled_message % (funcstr, argstr)) def visit_Call(self, node): name = self.called_node_name(node.func) @@ -450,7 +450,7 @@ class ShellParser(): cmd = word[1] if cmd.startswith("$"): - self.log.debug(1, self.unhandled_template % cmd) + self.log.debug(self.unhandled_template % cmd) elif cmd == "eval": command = " ".join(word for _, word in words[1:]) self._parse_shell(command) |