mirror of
https://opendev.org/x/pyghmi
synced 2026-05-17 03:44:24 +00:00
Merge "Use weak reference to return a proxy of object for gc"
This commit is contained in:
+2
-1
@@ -33,6 +33,7 @@ Information Storage Definition (Document Revision 1.2)
|
||||
|
||||
import struct
|
||||
import time
|
||||
import weakref
|
||||
|
||||
import pyghmi.exceptions as iexc
|
||||
import pyghmi.ipmi.private.spd as spd
|
||||
@@ -128,7 +129,7 @@ class FRU(object):
|
||||
if self.rawfru is not None:
|
||||
self.parsedata()
|
||||
elif ipmicmd is not None:
|
||||
self.ipmicmd = ipmicmd
|
||||
self.ipmicmd = weakref.proxy(ipmicmd)
|
||||
# Use the ipmicmd to fetch the data
|
||||
try:
|
||||
self.fetch_fru(fruid)
|
||||
|
||||
Reference in New Issue
Block a user