mirror of
https://git.yoctoproject.org/poky
synced 2026-02-20 08:29:42 +01:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
f738ed43e9
commit
9b2b23d5ec
@@ -402,8 +402,8 @@ def better_exec(code, context, text = None, realfile = "<code>", pythonexception
|
||||
(t, value, tb) = sys.exc_info()
|
||||
try:
|
||||
_print_exception(t, value, tb, realfile, text, context)
|
||||
except Exception as e:
|
||||
logger.error("Exception handler error: %s" % str(e))
|
||||
except Exception as e2:
|
||||
logger.error("Exception handler error: %s" % str(e2))
|
||||
|
||||
e = bb.BBHandledException(e)
|
||||
raise e
|
||||
|
||||
Reference in New Issue
Block a user