From f356c7b02d7941a8f114caeefe63ae2747152cf2 Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Tue, 19 Feb 2019 17:17:25 -0600 Subject: [PATCH] ensure ERROR doesn't print an empty string --- speedtest.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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__':