Module: check_mk
Branch: master
Commit: 38aaaef9a456cbed629abf75540cb9b66b52b218
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=38aaaef9a456cb…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Mar 8 13:09:53 2018 +0100
5894 FIX Fixed possible exception on service discovery page for SNMP hosts
When inline SNMP is used it might happen that the service discovery page
shows an error "Exception TypeError: "'NoneType' object is not
callable" instead
of the table of services.
Change-Id: Idf81187b333a89bc75fe49d43c89f3192cda512c
---
.werks/5894 | 12 ++++++++++++
.../0013-fix-possible-TypeError-in-__del__.dif | 21 +++++++++++++++++++++
2 files changed, 33 insertions(+)
diff --git a/.werks/5894 b/.werks/5894
new file mode 100644
index 0000000..8d62749
--- /dev/null
+++ b/.werks/5894
@@ -0,0 +1,12 @@
+Title: Fixed possible exception on service discovery page for SNMP hosts
+Level: 1
+Component: inline-snmp
+Compatible: compat
+Edition: cee
+Version: 1.5.0i4
+Date: 1520510916
+Class: fix
+
+When inline SNMP is used it might happen that the service discovery page
+shows an error "Exception TypeError: "'NoneType' object is not
callable" instead
+of the table of services.
diff --git a/omd/packages/net-snmp/patches/0013-fix-possible-TypeError-in-__del__.dif
b/omd/packages/net-snmp/patches/0013-fix-possible-TypeError-in-__del__.dif
new file mode 100644
index 0000000..0d9b03b
--- /dev/null
+++ b/omd/packages/net-snmp/patches/0013-fix-possible-TypeError-in-__del__.dif
@@ -0,0 +1,21 @@
+diff -Nur net-snmp-734f855.orig/python/netsnmp/client.py
net-snmp-734f855/python/netsnmp/client.py
+--- net-snmp-734f855.orig/python/netsnmp/client.py 2018-03-08 13:05:07.718970500 +0100
++++ net-snmp-734f855/python/netsnmp/client.py 2018-03-08 13:07:23.259098808 +0100
+@@ -202,8 +202,15 @@
+ return res
+
+ def __del__(self):
+- res = client_intf.delete_session(self)
+- return res
++ try:
++ res = client_intf.delete_session(self)
++ return res
++ except TypeError:
++ # Saw this exception:
++ # Exception TypeError: "'NoneType' object is not callable"
in <bound method Session.__del__ of <netsnmp.client.Session object at
0x7f173765f890>> ignored
++ # Add the exception handler here to catch this problem.
++ pass
++
+
+ import netsnmp
+