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:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user