Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
Signed-off-by: maipbui <maibui@microsoft.com>
  • Loading branch information
maipbui committed Sep 21, 2022
1 parent 552abed commit 65b4300
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions device/celestica/x86_64-cel_silverstone-r0/plugins/psuutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class PsuUtil(PsuBase):
"""Platform-specific PSUutil class"""

def __init__(self):
self.ipmi_raw = ["docker", "exec", "-ti", "pmon", "ipmitool", "raw", "0x4", "0x2d"]
self.ipmi_raw = ["docker", "exec", "-ti", "pmon", "ipmitool", "raw", "0x4", "0x2d", ""]
self.psu1_id = "0x2f"
self.psu2_id = "0x39"
PsuBase.__init__(self)
Expand Down Expand Up @@ -51,7 +51,8 @@ def get_psu_status(self, index):
return False

psu_id = self.psu1_id if index == 1 else self.psu2_id
res_string = self.run_command(self.ipmi_raw.append(psu_id))
self.ipmi_raw[8] = psu_id
res_string = self.run_command(self.ipmi_raw)
status_byte = self.find_value(res_string)

if status_byte is None:
Expand All @@ -75,7 +76,8 @@ def get_psu_presence(self, index):
return False

psu_id = self.psu1_id if index == 1 else self.psu2_id
res_string = self.run_command(self.ipmi_raw.append(psu_id))
self.ipmi_raw[8] = psu_id
res_string = self.run_command(self.ipmi_raw)
status_byte = self.find_value(res_string)

if status_byte is None:
Expand Down

0 comments on commit 65b4300

Please sign in to comment.