Module: check_mk
Branch: master
Commit: 90a75e243cbddea5c6bede342f63ceea9c766f36
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=90a75e243cbdde…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Fri Jun 12 09:45:31 2015 +0200
Updated bug entries #2342
---
.bugs/2342 | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/.bugs/2342 b/.bugs/2342
index b4da4ef..bb74747 100644
--- a/.bugs/2342
+++ b/.bugs/2342
@@ -35,3 +35,20 @@ Traceback (most recent call last):
File "/omd/sites/heute/share/check_mk/modules/check_mk.py", line 779, in
snmp_get_oid
if value.startswith('"') and value.endswith('"'):
AttributeError: 'NoneType' object has no attribute 'startswith'
+
+============================================================
+possible solution:
+
+diff --git a/modules/check_mk.py b/modules/check_mk.py
+index 9906bc7..6aedca7 100755
+--- a/modules/check_mk.py
++++ b/modules/check_mk.py
+@@ -776,7 +776,7 @@ def snmp_get_oid(hostname, ipaddress, oid):
+ value = None
+
+ # Strip quotes
+- if value.startswith('"') and value.endswith('"'):
++ if value and value.startswith('"') and
value.endswith('"'):
+ value = value[1:-1]
+ return value
+