From 5cc617d3727d773206a67106fca22c146cf2f0aa Mon Sep 17 00:00:00 2001 From: elie Date: Wed, 3 Jun 2015 18:31:29 +0000 Subject: fix to pysmi status interpretation --- pysnmp/smi/builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pysnmp/smi/builder.py b/pysnmp/smi/builder.py index 4c0ce9c..22c7776 100644 --- a/pysnmp/smi/builder.py +++ b/pysnmp/smi/builder.py @@ -321,7 +321,7 @@ class MibBuilder: if self.__mibCompiler: debug.logger & debug.flagBld and debug.logger('loadModules: calling MIB compiler for %s' % modName) status = self.__mibCompiler.compile(modName) - errs = '; '.join([str(x.error) for x in status.values() if x in ('failed', 'missing')]) + errs = '; '.join([hasattr(x, 'error') and str(x.error) or x for x in status.values() if x in ('failed', 'missing')]) if errs: raise error.MibNotFoundError('%s compilation error(s): %s' % (modName, errs)) # compilation suceeded, MIB might load now -- cgit v1.2.1