Skip to content

Commit

Permalink
Fix ipmi_sdr_list
Browse files Browse the repository at this point in the history
Signed-off-by: maipbui <maibui@microsoft.com>
  • Loading branch information
maipbui committed Aug 31, 2022
1 parent 24bab7a commit a1bd8ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions device/dell/x86_64-dellemc_s5232f_c3538-r0/plugins/psuutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def get_psu_status(self, index):
p = subprocess.run(IPMI_PSU2_DATA, capture_output=True, universal_newlines=True)
ret_status = p.returncode
line = p.stdout.replace('\n', '')
ipmi_sdr_list = line[8] if len(line) > 8 else ''
ipmi_sdr_list = line[8] if len(line) > 8 else 'f'

if ret_status:
logging.error('Failed to execute ipmitool : ')
Expand Down Expand Up @@ -131,7 +131,7 @@ def get_psu_presence(self, index):
p = subprocess.run(IPMI_PSU2_DATA, capture_output=True, universal_newlines=True)
ret_status = p.returncode
line = p.stdout.replace('\n', '')
ipmi_sdr_list = line[8] if len(line) > 8 else ''
ipmi_sdr_list = line[8] if len(line) > 8 else '0'

if ret_status:
logging.error('Failed to execute ipmitool : ')
Expand Down

0 comments on commit a1bd8ec

Please sign in to comment.