Verified Commit 0b358a0b authored by Dmitry Volodin's avatar Dmitry Volodin
Browse files

snmp: Clean up memory early

parent 019a8e5a
Pipeline #8129 passed with stages
in 1 minute and 6 seconds
......@@ -126,7 +126,8 @@ class SNMP(object):
version = self._get_snmp_version(version)
self.get_ioloop().run_sync(run)
return self.result
r, self.result = self.result, None
return r
def set(self, *args):
"""
......@@ -158,7 +159,8 @@ class SNMP(object):
else:
raise ValueError("Invalid varbinds")
self.get_ioloop().run_sync(run)
return self.result
r, self.result = self.result, None
return r
def count(self, oid, filter=None, version=None):
"""
......@@ -188,7 +190,8 @@ class SNMP(object):
version = self._get_snmp_version(version)
self.get_ioloop().run_sync(run)
return self.result
r, self.result = self.result, None
return r
def getnext(self, oid, community_suffix=None,
filter=None, cached=False,
......@@ -222,7 +225,8 @@ class SNMP(object):
version = self._get_snmp_version(version)
self.get_ioloop().run_sync(run)
return self.result
r, self.result = self.result, None
return r
def get_table(self, oid, community_suffix=None, cached=False):
"""
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment