Module: check_mk
Branch: master
Commit: a4629177bb096ec0b186c6a986acb279974aeb3a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a4629177bb096e…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Feb 4 14:38:24 2013 +0100
precompiled checks: fixed sys.exit() on python2.4
---
ChangeLog | 1 +
modules/check_mk.py | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 12da405..0c4e86c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@
creation of the files (Thanks to Guido Günther)
* FIX: Inventory for cluster nodes who are part of multiple clusters
* cmk --notify: added plugin for sms notification
+ * FIX: precompiled checks: correct handling of sys.exit() call when using python2.4
Checks & Agents:
* winperf_processor now outputs float usage instead of integer
diff --git a/modules/check_mk.py b/modules/check_mk.py
index d5561a2..86c0b82 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -2796,6 +2796,8 @@ no_inventory_possible = None
# perform actual check with a general exception handler
output.write("try:\n")
output.write(" do_check(%r, %r)\n" % (hostname, ipaddress))
+ output.write("except SystemExit, e:\n")
+ output.write(" sys.exit(e.code)\n")
output.write("except Exception, e:\n")
output.write(" import traceback, pprint\n")