summaryrefslogtreecommitdiff
path: root/pysnmp
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2018-12-25 11:30:51 +0100
committerIlya Etingof <etingof@gmail.com>2018-12-25 11:31:29 +0100
commitc328f30a8146870e309dc9cb16f1f708246b22a9 (patch)
treea2c4cb75c0bc3348f2954c0e24d863a83720f100 /pysnmp
parentcf6b887e9217a65a4cce20288d8bde212e4e996b (diff)
downloadpysnmp-git-c328f30a8146870e309dc9cb16f1f708246b22a9.tar.gz
Fix wrong `set()` member deletion in `MibBuilder`
Diffstat (limited to 'pysnmp')
-rw-r--r--pysnmp/smi/builder.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pysnmp/smi/builder.py b/pysnmp/smi/builder.py
index 2e6701f2..acfc6ef9 100644
--- a/pysnmp/smi/builder.py
+++ b/pysnmp/smi/builder.py
@@ -316,7 +316,7 @@ class MibBuilder(object):
exec(compile(modData, modPath, 'exec'), g)
except Exception:
- del self.__modPathsSeen[modPath]
+ self.__modPathsSeen.remove(modPath)
raise error.MibLoadError(
'MIB module \'%s\' load error: %s' % (modPath, traceback.format_exception(*sys.exc_info()))
)
@@ -373,7 +373,7 @@ class MibBuilder(object):
'No module %s at %s' % (modName, self)
)
self.unexportSymbols(modName)
- del self.__modPathsSeen[self.__modSeen[modName]]
+ self.__modPathsSeen.remove(self.__modSeen[modName])
del self.__modSeen[modName]
debug.logger & debug.flagBld and debug.logger('unloadModules: %s' % modName)