2
0
mirror of https://opendev.org/x/pyghmi synced 2025-08-24 03:50:20 +00:00

Remove a cyclical reference in Lenovo OEM

For now, use weakref to break a cyclic reference.

Longer term, probably refactor the needed 'xraw_command' to session and
pass session to the handler rather than the parent command handler.

Change-Id: If129ff6abf8666978aa05b6695ed7373070cd6b9
This commit is contained in:
Jarrod Johnson
2016-03-31 16:57:21 -04:00
parent 4de77dce9c
commit 195f370418

View File

@@ -41,6 +41,7 @@ import pyghmi.util.webclient as wc
import socket
import struct
import weakref
inventory.register_inventory_category(cpu)
inventory.register_inventory_category(dimm)
@@ -127,7 +128,7 @@ class OEMHandler(generic.OEMHandler):
# will need to retain data to differentiate
# variations. For example System X versus Thinkserver
self.oemid = oemid
self.ipmicmd = ipmicmd
self.ipmicmd = weakref.ref(ipmicmd)
self._has_megarac = None
self.oem_inventory_info = None