From 02ae33f39e1efca32010b58cec5fbf826a549a33 Mon Sep 17 00:00:00 2001 From: mihirpat1 <112018033+mihirpat1@users.noreply.github.com> Date: Wed, 28 Feb 2024 09:12:43 -0800 Subject: [PATCH] Modify transceiver PM CLI to handle N/A value for DOM threshold (#3174) Signed-off-by: Mihir Patel --- scripts/sfpshow | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/sfpshow b/scripts/sfpshow index 81add13296..1fd7479ba4 100755 --- a/scripts/sfpshow +++ b/scripts/sfpshow @@ -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: