Module: check_mk
Branch: master
Commit: e6d52651a6f070ca897c8571fa33a73c2298299f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e6d52651a6f070…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Feb 2 09:05:15 2011 +0100
Fix bug with fake_file class
---
ChangeLog | 4 ++++
modules/check_mk.py | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 87033a1..d442f49 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+1.1.9i7:
+ Core, Setup, etc.:
+ * Fix crash on Python 2.4 (e.g. RedHat) with fake_file
+
1.1.9i6:
INCOMPATIBLE CHANGES:
* Removed out-dated checks blade_misc, ironport_misc and snia_sml. Replaced
diff --git a/modules/check_mk.py b/modules/check_mk.py
index f338a4e..c9693ae 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -3662,7 +3662,7 @@ def automation_restart():
# HTTP connections. Really.
os.closerange(3, 256)
- class fake_file():
+ class null_file:
def write(self, stuff):
pass
def flush(self):
@@ -3670,7 +3670,7 @@ def automation_restart():
# Deactivate stdout by introducing fake file without filedescriptor
old_stdout = sys.stdout
- sys.stdout = fake_file()
+ sys.stdout = null_file()
try:
if os.path.exists(nagios_objects_file):