Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sivel/speedtest-cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Martz <matt@sivel.net>2019-02-20 02:17:25 +0300
committerMatt Martz <matt@sivel.net>2019-02-20 02:17:25 +0300
commitf356c7b02d7941a8f114caeefe63ae2747152cf2 (patch)
tree62cde9ed2dd8679403f66e91d1efee29a4e9a71b
parent6cf43b2ff7fe67f63351b7e537b9944ea434d76e (diff)
ensure ERROR doesn't print an empty string
-rwxr-xr-xspeedtest.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/speedtest.py b/speedtest.py
index 464e2f7..217ee39 100755
--- a/speedtest.py
+++ b/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__':