Module: check_mk
Branch: master
Commit: ed201374b763b56197c36fef707adbc021da5e9c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ed201374b763b5…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri May 2 13:48:25 2014 +0200
FIX Fix hanging shutdown of CMC on RedHat 5.X
When using the CMC on RedHat/CentOS 5.X then the CMC would not correctly
shutdown. The reason is, that the Python implementation of that OSes
raises an Exception on sys.exit, while newer versions don't. This has
been fixed by handling <tt>SystemExit</tt> explicitely.
---
.werks/964 | 12 ++++++++++++
ChangeLog | 1 +
modules/notify.py | 4 ++++
3 files changed, 17 insertions(+)
diff --git a/.werks/964 b/.werks/964
new file mode 100644
index 0000000..9f81088
--- /dev/null
+++ b/.werks/964
@@ -0,0 +1,12 @@
+Title: Fix hanging shutdown of CMC on RedHat 5.X
+Level: 2
+Component: notifications
+Class: fix
+State: unknown
+Version: 1.2.5i3
+Date: 1399031217
+
+When using the CMC on RedHat/CentOS 5.X then the CMC would not correctly
+shutdown. The reason is, that the Python implementation of that OSes
+raises an Exception on sys.exit, while newer versions don't. This has
+been fixed by handling <tt>SystemExit</tt> explicitely.
diff --git a/ChangeLog b/ChangeLog
index 6f65994..54fd5a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -91,6 +91,7 @@
* 0752 FIX: FIX: compute correct state transitions for notifications...
* 0753 FIX: FIX: correctly show original state in HTML notification mails...
* 0609 FIX: mail notification script now uses 6 digit hex codes for colors to be
better compatible with web based mail browsers
+ * 0964 FIX: Fix hanging shutdown of CMC on RedHat 5.X...
Reporting & Availability:
* 0756 Allow availability of multisite BI aggregates at once...
diff --git a/modules/notify.py b/modules/notify.py
index 2aa518d..4351b46 100644
--- a/modules/notify.py
+++ b/modules/notify.py
@@ -370,6 +370,10 @@ def notify_keepalive():
sys.stdout.write("*")
sys.stdout.flush()
+
+ # Fix vor Python 2.4:
+ except SystemExit, e:
+ sys.exit(e)
except Exception, e:
if opt_debug:
raise