From 4f1a240bc2c2029f281330c13273bfc876219c45 Mon Sep 17 00:00:00 2001 From: Michael Hirsch Date: Sun, 12 Jul 2020 09:08:04 -0400 Subject: raise SystemExit() generally preferred to sys.exit(1) --- test cases/python/2 extmodule/blaster.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'test cases/python/2 extmodule/blaster.py') diff --git a/test cases/python/2 extmodule/blaster.py b/test cases/python/2 extmodule/blaster.py index 7e1eae63a..1f0187645 100755 --- a/test cases/python/2 extmodule/blaster.py +++ b/test cases/python/2 extmodule/blaster.py @@ -1,14 +1,11 @@ #!/usr/bin/env python3 import tachyon -import sys result = tachyon.phaserize('shoot') if not isinstance(result, int): - print('Returned result not an integer.') - sys.exit(1) + raise SystemExit('Returned result not an integer.') if result != 1: - print('Returned result {} is not 1.'.format(result)) - sys.exit(1) + raise SystemExit('Returned result {} is not 1.'.format(result)) -- cgit v1.2.3