Module: check_mk
Branch: master
Commit: becad1bc22064ed7287aeec5b086e2d4edf6c010
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=becad1bc22064e…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Jun 2 16:02:10 2017 +0200
4706 FIX Fixed broken upload of snmp mibs (cannot import name defaultMibPackages)
Change-Id: Id59621ca0bf07bcb4cfe1522c9a462585e9bee19
---
.werks/4706 | 11 +++++++++++
web/plugins/wato/mkeventd.py | 5 ++++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/4706 b/.werks/4706
new file mode 100644
index 0000000..640ac78
--- /dev/null
+++ b/.werks/4706
@@ -0,0 +1,11 @@
+Title: Fixed broken upload of snmp mibs (cannot import name defaultMibPackages)
+Level: 1
+Component: ec
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1496412087
+
+
diff --git a/web/plugins/wato/mkeventd.py b/web/plugins/wato/mkeventd.py
index 777b639..f5b2f63 100644
--- a/web/plugins/wato/mkeventd.py
+++ b/web/plugins/wato/mkeventd.py
@@ -2048,11 +2048,14 @@ def validate_and_compile_mib(mibname, content):
from pysmi.searcher.pyfile import PyFileSearcher
from pysmi.writer.pyfile import PyFileWriter
from pysmi.reader.localfile import FileReader
- from pysmi.codegen.pysnmp import PySnmpCodeGen, baseMibs, defaultMibPackages
+ from pysmi.codegen.pysnmp import PySnmpCodeGen
from pysmi.writer.callback import CallbackWriter
from pysmi.reader.callback import CallbackReader
from pysmi.searcher.stub import StubSearcher
from pysmi.error import PySmiError
+
+ defaultMibPackages = PySnmpCodeGen.defaultMibPackages
+ baseMibs = PySnmpCodeGen.baseMibs
except ImportError, e:
raise Exception(_('You are missing the needed pysmi python module (%s).')
% e)