test/py: Correct handling of exceptions

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: 85d7dae377 ("test: Detect dead connections")
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
This commit is contained in:
Simon Glass
2025-05-29 08:14:52 -06:00
committed by Tom Rini
parent ef82e45c2e
commit 2ab10ed239

View File

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