summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorChris Laplante <chris.laplante@agilent.com>2020-09-08 19:31:50 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-10 13:49:21 +0100
commit9b2b23d5ec4c9b0031ad9c002ab40e70a49fe71e (patch)
treeba83f3614e3fd43ec2bf8120245bbf09b6ecb42f /bitbake
parentf738ed43e93eaf971615ef5105ece567f280c85e (diff)
downloadpoky-9b2b23d5ec4c9b0031ad9c002ab40e70a49fe71e.tar.gz
bitbake: utils: fix UnboundLocalError when _print_exception raises
PEP 3110 changed how exceptions work. 'e' is unbound after the 'except' clause. See: https://www.python.org/dev/peps/pep-3110/#semantic-changes (Bitbake rev: b69e97de53eb172ed730993e3b755debaa26f30d) Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index d6afa21542..0b79f92e25 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -402,8 +402,8 @@ def better_exec(code, context, text = None, realfile = "<code>", pythonexception
402 (t, value, tb) = sys.exc_info() 402 (t, value, tb) = sys.exc_info()
403 try: 403 try:
404 _print_exception(t, value, tb, realfile, text, context) 404 _print_exception(t, value, tb, realfile, text, context)
405 except Exception as e: 405 except Exception as e2:
406 logger.error("Exception handler error: %s" % str(e)) 406 logger.error("Exception handler error: %s" % str(e2))
407 407
408 e = bb.BBHandledException(e) 408 e = bb.BBHandledException(e)
409 raise e 409 raise e