Module: check_mk
Branch: master
Commit: 78434dc4e24494f960a6fa16e1f27184df68b728
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=78434dc4e24494…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Feb 4 11:05:18 2011 +0100
Fixed WATO problem on older Python versions (closerange)
---
ChangeLog | 4 ++++
modules/check_mk.py | 7 ++++++-
2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f8ed2bb..b67ca09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+1.1.9i8:
+ WATO:
+ * Fixed problem appearing at restart on older Python version (RH)
+
1.1.9i7:
Core, Setup, etc.:
* Fix crash on Python 2.4 (e.g. RedHat) with fake_file
diff --git a/modules/check_mk.py b/modules/check_mk.py
index c9693ae..fa1df1a 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -3660,7 +3660,12 @@ def automation_restart():
# check_mk is called by WATO via Apache. Nagios inherits
# the open file where Apache is listening for incoming
# HTTP connections. Really.
- os.closerange(3, 256)
+ for fd in range(3, 256):
+ try:
+ os.close(fd)
+ except:
+ pass
+ # os.closerange(3, 256) --> not available in older Python versions
class null_file:
def write(self, stuff):