From 0ec5efafb597073707d72fd4837bf4e20e3cfdd4 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sun, 17 Aug 2014 13:31:24 +0200 Subject: [PATCH] icinga2-list-objects: Improve compatibility with Python 2.4 refs #6702 --- python/icinga2/commands/list_objects.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/icinga2/commands/list_objects.py b/python/icinga2/commands/list_objects.py index e4622d188..bf8bca3b7 100644 --- a/python/icinga2/commands/list_objects.py +++ b/python/icinga2/commands/list_objects.py @@ -27,7 +27,8 @@ def main(): try: opts, args = getopt.getopt(sys.argv[1:], "h", ["help", "color"]) - except getopt.GetoptError as err: + except getopt.GetoptError: + t, err = sys.exc_info()[:2] # print help information and exit: print str(err) # will print something like "option -a not recognized" usage()