Skip to content

Commit

Permalink
[sonic_sfp] Interpret sff 'int' element =0 as valid value (sonic-net#51)
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Kokhan <akokhan@barefootnetworks.com>
  • Loading branch information
akokhan authored and jleveque committed Aug 12, 2019
1 parent e079b09 commit 0caf265
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sonic_platform_base/sonic_sfp/sffbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0caf265

Please sign in to comment.