diff options
| author | Michael Hirsch <scivision@users.noreply.github.com> | 2020-07-12 09:08:04 -0400 |
|---|---|---|
| committer | Michael Hirsch <scivision@users.noreply.github.com> | 2020-07-12 09:08:04 -0400 |
| commit | 4f1a240bc2c2029f281330c13273bfc876219c45 (patch) | |
| tree | 540388d091e6f1be66489f402ddf40bdd68fd041 /test cases/python/2 extmodule/blaster.py | |
| parent | 173d1624cb82f213d1e4fd738874c4de49f9bf47 (diff) | |
| download | meson-4f1a240bc2c2029f281330c13273bfc876219c45.tar.gz | |
raise SystemExit() generally preferred to sys.exit(1)
Diffstat (limited to 'test cases/python/2 extmodule/blaster.py')
| -rwxr-xr-x | test cases/python/2 extmodule/blaster.py | 7 |
1 files changed, 2 insertions, 5 deletions
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)) |
