]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
test/py: Correct handling of exceptions
authorSimon Glass <sjg@chromium.org>
Thu, 29 May 2025 14:14:52 +0000 (08:14 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 12 Jun 2025 17:32:29 +0000 (11:32 -0600)
If an Unexpected exception is thrown in a test, an undefined variable
error is reported. Fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 85d7dae377a ("test: Detect dead connections")
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
test/py/conftest.py

index eec0b5488e4ed12444c9f824d8ff9820042ed2cc..8ce680a92a0c37f36489b0782921d6cf4078850d 100644 (file)
@@ -515,7 +515,7 @@ def ubman(request):
     except BootFail as err:
         handle_exception(ubconfig, ubman_fix, log, err, 'Boot fail', True,
                          ubman_fix.get_spawn_output())
-    except Unexpected:
+    except Unexpected as err:
         handle_exception(ubconfig, ubman_fix, log, err, 'Unexpected test output',
                          False)
     return ubman_fix