diff options
author | Chris Laplante <chris.laplante@agilent.com> | 2020-09-08 19:31:50 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-09 23:40:07 +0100 |
commit | b69e97de53eb172ed730993e3b755debaa26f30d (patch) | |
tree | c826b23359247a7ba0976af870c7e12019cd4ea9 | |
parent | f08a6601c9bb09622855d62e1cedb92fafd2f71d (diff) | |
download | bitbake-b69e97de53eb172ed730993e3b755debaa26f30d.tar.gz |
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
Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/utils.py b/lib/bb/utils.py index d6afa2154..0b79f92e2 100644 --- a/lib/bb/utils.py +++ b/lib/bb/utils.py @@ -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 |