Module: check_mk
Branch: master
Commit: 696221b40e883065056bf30832f27e74cc95a285
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=696221b40e8830…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Nov 6 16:26:06 2015 +0100
#2774 FIX Fix exception when deleting certain types of MIBs
---
.werks/2774 | 10 ++++++++++
ChangeLog | 1 +
mkeventd/web/plugins/wato/mkeventd.py | 7 ++++---
3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/.werks/2774 b/.werks/2774
new file mode 100644
index 0000000..1d13277
--- /dev/null
+++ b/.werks/2774
@@ -0,0 +1,10 @@
+Title: Fix exception when deleting certain types of MIBs
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1446823549
+
+
diff --git a/ChangeLog b/ChangeLog
index 1ab4c03..7ab7699 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -86,6 +86,7 @@
* 2721 FIX: Fixed user profile sync in distributed environments after profile change
* 2723 FIX: Hiding "discard changes button" after successful activation of
changes
* 2742 FIX: Make selection of folders and host group tag filter use nicer drawing
characters
+ * 2774 FIX: Fix exception when deleting certain types of MIBs
Notifications:
* 2728 FIX: Removed debug notification script (was not executable)...
diff --git a/mkeventd/web/plugins/wato/mkeventd.py
b/mkeventd/web/plugins/wato/mkeventd.py
index b7fc115..511b0d0 100644
--- a/mkeventd/web/plugins/wato/mkeventd.py
+++ b/mkeventd/web/plugins/wato/mkeventd.py
@@ -1938,9 +1938,10 @@ def parse_snmp_mib_header(path):
# read till first "OBJECT IDENTIFIER" declaration
head = ''
for line in file(path):
- if 'OBJECT IDENTIFIER' in line:
- break # seems the header is finished
- head += line
+ if not line.startswith("--"):
+ if 'OBJECT IDENTIFIER' in line:
+ break # seems the header is finished
+ head += line
# now try to extract some relevant information from the header