diff options
author | Matt Martz <matt@sivel.net> | 2017-12-11 18:35:41 +0300 |
---|---|---|
committer | Matt Martz <matt@sivel.net> | 2017-12-11 18:35:41 +0300 |
commit | eab354603f5b92d7775e04866e8fa8a853937070 (patch) | |
tree | 9e703c4c259f8a3ae68807e1d4d3794606290c62 | |
parent | e80ccc464790ded3a6bab77639d400372478ee47 (diff) |
Don't display ERROR: 2 when argparse exits with non-0
-rwxr-xr-x | speedtest.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/speedtest.py b/speedtest.py index 79c473e..da74eb2 100755 --- a/speedtest.py +++ b/speedtest.py @@ -1780,7 +1780,8 @@ def main(): print_('\nCancelling...') except (SpeedtestException, SystemExit): e = get_exception() - if getattr(e, 'code', 1) != 0: + # Ignore a successful exit, or argparse exit + if getattr(e, 'code', 1) not in (0, 2): raise SystemExit('ERROR: %s' % e) |