2
0
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:
Zuul
2021-08-31 11:51:36 +00:00
committed by Gerrit Code Review
+2 -1
View File
@@ -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)