]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: build.py: add unhandled exception information to the logger when executing...
authorAlexander Kanavin <alex.kanavin@gmail.com>
Mon, 11 Feb 2019 14:13:01 +0000 (15:13 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 14 Feb 2019 11:21:58 +0000 (11:21 +0000)
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>
bitbake/lib/bb/build.py

index 3e2a94edb11af97adac0e4d2a92daf8382df4ca4..7571421d71b2be954a3c58e2211e1a1b21a6b582 100644 (file)
@@ -304,9 +304,10 @@ def exec_func_python(func, d, runfile, cwd=None, pythonexception=False):
         utils.better_exec(comp, {"d": d}, code, "exec_python_func() autogenerated", pythonexception=pythonexception)
     except (bb.parse.SkipRecipe, bb.build.FuncFailed):
         raise
-    except:
+    except Exception as e:
         if pythonexception:
             raise
+        logger.error(str(e))
         raise FuncFailed(func, None)
     finally:
         bb.debug(2, "Python function %s finished" % func)