2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-27 19:37:44 +00:00

Discard reference when no longer needed

If an 'onlogon' handler is passed, discard it after being invoked.  This allows
the objects to be garbage collected where otherwise they may not be.

Change-Id: I92488adca9150204512db5e4872e2b54bd0c076d
This commit is contained in:
Jarrod Johnson 2016-04-01 17:10:23 -04:00
parent 4de77dce9c
commit f5f80c9cb6

View File

@ -147,6 +147,7 @@ class Command(object):
def logged(self, response):
self.onlogon(response, self)
self.onlogon = None
@classmethod
def eventloop(cls):