From a39a66e5935789cd2f5017440be624e08a379a58 Mon Sep 17 00:00:00 2001 From: Mario Dominguez Date: Fri, 25 Oct 2024 14:06:52 +0200 Subject: [PATCH] capture except properly Signed-off-by: Mario Dominguez --- test/examples/test_hello_world.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/examples/test_hello_world.py b/test/examples/test_hello_world.py index 110f2f6d0c..f643f51a41 100644 --- a/test/examples/test_hello_world.py +++ b/test/examples/test_hello_world.py @@ -34,7 +34,7 @@ def test_hello_world(): if 'RECEIVED' in line: received += 1 - + if sent != 0 and received != 0 and sent * 2 == received: ret = True else: @@ -42,7 +42,7 @@ def test_hello_world(): ' (expected: ' + str(sent * 2) + ')') raise subprocess.CalledProcessError(1, '') - except subprocess.CalledProcessError: + except subprocess.CalledProcessError as e: print ('ERROR %s', e.output) except subprocess.TimeoutExpired: print('TIMEOUT')