Commit 69c87578 authored by Michael Tremer's avatar Michael Tremer

location: Print proper error message for any uncaught exceptions

Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent 68679ef4
...@@ -238,6 +238,11 @@ class CLI(object): ...@@ -238,6 +238,11 @@ class CLI(object):
sys.stderr.write("%s\n" % e) sys.stderr.write("%s\n" % e)
ret = 2 ret = 2
# Catch any other exceptions
except Exception as e:
sys.stderr.write("%s\n" % e)
ret = 1
# Return with exit code # Return with exit code
if ret: if ret:
sys.exit(ret) sys.exit(ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment