ensure ERROR doesn't print an empty string
This commit is contained in:
parent
6cf43b2ff7
commit
f356c7b02d
|
@ -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…
Reference in New Issue