From f5f80c9cb66280e56cd34269974186c91329e63c Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 1 Apr 2016 17:10:23 -0400 Subject: [PATCH] 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 --- pyghmi/ipmi/command.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyghmi/ipmi/command.py b/pyghmi/ipmi/command.py index c5f031dd..4775e5d0 100644 --- a/pyghmi/ipmi/command.py +++ b/pyghmi/ipmi/command.py @@ -147,6 +147,7 @@ class Command(object): def logged(self, response): self.onlogon(response, self) + self.onlogon = None @classmethod def eventloop(cls):