diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2019-02-11 15:13:01 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-14 11:21:58 +0000 |
commit | 2f17b87f9712d0e218d656dae0037d15a019f9f6 (patch) | |
tree | 14d2271ff4fe4efa3dfd3826e9bae52a0dafb738 | |
parent | df91cbf7ac4a40d40cb7e70e9e45a171925fe434 (diff) | |
download | poky-2f17b87f9712d0e218d656dae0037d15a019f9f6.tar.gz |
bitbake: build.py: add unhandled exception information to the logger when executing python tasks
Previously this information was simply discarded, which in some cases
resulted in generic, unhelpful failures.
With this change the user would see what the exception is, but
without ugly tracebacks or bulky, irrelevant information from the log file.
(Bitbake rev: 8da9242702fbef8cf3156b95a1076802e0f653c7)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/build.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 3e2a94edb1..7571421d71 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -304,9 +304,10 @@ def exec_func_python(func, d, runfile, cwd=None, pythonexception=False): | |||
304 | utils.better_exec(comp, {"d": d}, code, "exec_python_func() autogenerated", pythonexception=pythonexception) | 304 | utils.better_exec(comp, {"d": d}, code, "exec_python_func() autogenerated", pythonexception=pythonexception) |
305 | except (bb.parse.SkipRecipe, bb.build.FuncFailed): | 305 | except (bb.parse.SkipRecipe, bb.build.FuncFailed): |
306 | raise | 306 | raise |
307 | except: | 307 | except Exception as e: |
308 | if pythonexception: | 308 | if pythonexception: |
309 | raise | 309 | raise |
310 | logger.error(str(e)) | ||
310 | raise FuncFailed(func, None) | 311 | raise FuncFailed(func, None) |
311 | finally: | 312 | finally: |
312 | bb.debug(2, "Python function %s finished" % func) | 313 | bb.debug(2, "Python function %s finished" % func) |