Skip to content

Commit 02ae33f

Browse files
mihirpat1mssonicbld
authored andcommitted
Modify transceiver PM CLI to handle N/A value for DOM threshold (sonic-net#3174)
Signed-off-by: Mihir Patel <[email protected]>
1 parent c711b06 commit 02ae33f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/sfpshow

+4-2
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,10 @@ class SFPShow(object):
517517
for suffix in ZR_PM_THRESHOLD_KEY_SUFFIXS:
518518
key = self.convert_pm_prefix_to_threshold_prefix(
519519
prefix) + suffix
520-
thresholds.append(
521-
float(sfp_threshold_dict[key]) if key in sfp_threshold_dict else None)
520+
if key in sfp_threshold_dict and sfp_threshold_dict[key] != 'N/A':
521+
thresholds.append(float(sfp_threshold_dict[key]))
522+
else:
523+
thresholds.append(None)
522524

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

0 commit comments

Comments
 (0)