From 69c87578309c3f6304794917a1a35e341c13661e Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 2 Mar 2022 10:50:34 +0000 Subject: [PATCH] location: Print proper error message for any uncaught exceptions Signed-off-by: Michael Tremer --- src/python/location.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/python/location.in b/src/python/location.in index 1026946..eec32e4 100644 --- a/src/python/location.in +++ b/src/python/location.in @@ -238,6 +238,11 @@ class CLI(object): sys.stderr.write("%s\n" % e) ret = 2 + # Catch any other exceptions + except Exception as e: + sys.stderr.write("%s\n" % e) + ret = 1 + # Return with exit code if ret: sys.exit(ret) -- 2.39.5