Skip to content

Commit

Permalink
Fix the -inf value display issue
Browse files Browse the repository at this point in the history
Signed-off-by: Kebo Liu <[email protected]>
  • Loading branch information
keboliu committed Oct 20, 2022
1 parent b02794b commit 0d1a06c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,9 +546,7 @@ def _dom_capability_detect(self):


def _convert_string_to_num(self, value_str):
if "-inf" in value_str:
return 'N/A'
elif "Unknown" in value_str:
if "Unknown" in value_str:
return 'N/A'
elif 'dBm' in value_str:
t_str = value_str.rstrip('dBm')
Expand Down

0 comments on commit 0d1a06c

Please sign in to comment.