Browse Source

ensure ERROR doesn't print an empty string

travis-test
Matt Martz 4 years ago
parent
commit
f356c7b02d
  1. 5
      speedtest.py

5
speedtest.py

@ -1915,7 +1915,10 @@ def main():
e = get_exception()
# Ignore a successful exit, or argparse exit
if getattr(e, 'code', 1) not in (0, 2):
raise SystemExit('ERROR: %s' % e)
msg = '%s' % e
if not msg:
msg = '%r' % e
raise SystemExit('ERROR: %s' % msg)
if __name__ == '__main__':

Loading…
Cancel
Save