From 12a04eab91c2254305ea1a1cec48f9a9555f385b Mon Sep 17 00:00:00 2001 From: Andriy Kokhan Date: Sat, 10 Aug 2019 00:43:32 -0700 Subject: [PATCH] [sonic_sfp] Interpret sff 'int' element =0 as valid value Signed-off-by: Andriy Kokhan --- sonic_platform_base/sonic_sfp/sffbase.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sonic_platform_base/sonic_sfp/sffbase.py b/sonic_platform_base/sonic_sfp/sffbase.py index 6d944b6f1..79fa1a7c4 100644 --- a/sonic_platform_base/sonic_sfp/sffbase.py +++ b/sonic_platform_base/sonic_sfp/sffbase.py @@ -132,9 +132,7 @@ def parse_sff_element(self, eeprom_data, eeprom_ele, start_pos): offset + size) elif type == 'int': - data = int(eeprom_data[offset], 16) - if data != 0: - value = data + value = int(eeprom_data[offset], 16) elif type == 'date': value = self.convert_date_to_string(eeprom_data, offset,