mirror of
https://github.com/sivel/speedtest-cli.git
synced 2025-07-21 12:41:19 +02:00
ensure ERROR doesn't print an empty string
This commit is contained in:
@@ -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__':
|
||||
|
Reference in New Issue
Block a user