From: Simon Glass Date: Thu, 29 May 2025 14:14:52 +0000 (-0600) Subject: test/py: Correct handling of exceptions X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ab10ed2399b0c1c790733884935c94ad65aa2a8;p=pandora-u-boot.git 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 Fixes: 85d7dae377a ("test: Detect dead connections") Reviewed-by: Mattijs Korpershoek --- diff --git a/test/py/conftest.py b/test/py/conftest.py index eec0b5488e4..8ce680a92a0 100644 --- a/test/py/conftest.py +++ b/test/py/conftest.py @@ -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