Skip to content

Commit

Permalink
capture except properly
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Dominguez <[email protected]>
  • Loading branch information
Mario-DL committed Oct 25, 2024
1 parent e6a0d5a commit a39a66e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/examples/test_hello_world.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ def test_hello_world():

if 'RECEIVED' in line:
received += 1

if sent != 0 and received != 0 and sent * 2 == received:
ret = True
else:
print('ERROR: sent: ' + str(sent) + ', but received: ' + str(received) +
' (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')
Expand Down

0 comments on commit a39a66e

Please sign in to comment.