Skip to content

Commit

Permalink
[202012][DellEMC] Z9332f PSU data is not updated in state DB (#7543)
Browse files Browse the repository at this point in the history
#### Why I did it

- PSU data is loaded into state DB.
   Following errors are seen in syslogs:
  "Failed to update PSU data - '<=' not supported between instances of 'float' and 'str'"

- Issue is not seen in master image as the PSU API return type is different.

#### How I did it

- Changed the return type in PSU API's.
  • Loading branch information
aravindmani-1 authored May 6, 2021
1 parent 2fc748e commit 11aa05b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def get_voltage(self):
if not is_valid:
return None

return "{:.1f}".format(voltage)
return float(voltage)

def get_voltage_low_threshold(self):
"""
Expand Down Expand Up @@ -159,7 +159,7 @@ def get_current(self):
if not is_valid:
return None

return "{:.1f}".format(current)
return float(current)

def get_power(self):
"""
Expand All @@ -173,7 +173,7 @@ def get_power(self):
if not is_valid:
return None

return "{:.1f}".format(power)
return float(power)

def get_powergood_status(self):
"""
Expand Down

0 comments on commit 11aa05b

Please sign in to comment.