mirror of
https://opendev.org/x/pyghmi
synced 2025-01-28 11:57:34 +00:00
Merge "Fix attempt to get LED against System X"
This commit is contained in:
commit
c2238a8587
@ -280,14 +280,16 @@ class OEMHandler(generic.OEMHandler):
|
||||
continue
|
||||
|
||||
def get_leds(self):
|
||||
for (name, id_) in leds.items():
|
||||
try:
|
||||
rsp = self.ipmicmd.xraw_command(netfn=0x3A, command=0x02,
|
||||
data=(id_,))
|
||||
except pygexc.IpmiException:
|
||||
continue # Ignore LEDs we can't retrieve
|
||||
status = led_status.get(ord(rsp['data'][0]), led_status_default)
|
||||
yield (name, {'status': status})
|
||||
if self.has_tsm:
|
||||
for (name, id_) in leds.items():
|
||||
try:
|
||||
rsp = self.ipmicmd.xraw_command(netfn=0x3A, command=0x02,
|
||||
data=(id_,))
|
||||
except pygexc.IpmiException:
|
||||
continue # Ignore LEDs we can't retrieve
|
||||
status = led_status.get(ord(rsp['data'][0]),
|
||||
led_status_default)
|
||||
yield (name, {'status': status})
|
||||
|
||||
def process_fru(self, fru):
|
||||
if fru is None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user