Skip to content

Commit

Permalink
Modify transceiver PM CLI to handle N/A value for DOM threshold (soni…
Browse files Browse the repository at this point in the history
…c-net#3174)

Signed-off-by: Mihir Patel <patelmi@microsoft.com>
  • Loading branch information
mihirpat1 authored and mssonicbld committed Feb 28, 2024
1 parent c711b06 commit 02ae33f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/sfpshow
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,10 @@ class SFPShow(object):
for suffix in ZR_PM_THRESHOLD_KEY_SUFFIXS:
key = self.convert_pm_prefix_to_threshold_prefix(
prefix) + suffix
thresholds.append(
float(sfp_threshold_dict[key]) if key in sfp_threshold_dict else None)
if key in sfp_threshold_dict and sfp_threshold_dict[key] != 'N/A':
thresholds.append(float(sfp_threshold_dict[key]))
else:
thresholds.append(None)

tca_high, tca_low = None, None
if values[2] is not None and thresholds[0] is not None:
Expand Down

0 comments on commit 02ae33f

Please sign in to comment.