Skip to content

Commit 0caf265

Browse files
akokhanjleveque
authored andcommitted
[sonic_sfp] Interpret sff 'int' element =0 as valid value (sonic-net#51)
Signed-off-by: Andriy Kokhan <[email protected]>
1 parent e079b09 commit 0caf265

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

sonic_platform_base/sonic_sfp/sffbase.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,7 @@ def parse_sff_element(self, eeprom_data, eeprom_ele, start_pos):
132132
offset + size)
133133

134134
elif type == 'int':
135-
data = int(eeprom_data[offset], 16)
136-
if data != 0:
137-
value = data
135+
value = int(eeprom_data[offset], 16)
138136

139137
elif type == 'date':
140138
value = self.convert_date_to_string(eeprom_data, offset,

0 commit comments

Comments
 (0)