Skip to content

Commit 0903660

Browse files
[platform] Correct get_name() in sfp.py of IX7
1 parent ba9213b commit 0903660

File tree

1 file changed

+2
-3
lines changed
  • platform/broadcom/sonic-platform-modules-quanta/ix7-32x/sonic_platform

1 file changed

+2
-3
lines changed

platform/broadcom/sonic-platform-modules-quanta/ix7-32x/sonic_platform/sfp.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,8 +1556,7 @@ def get_name(self):
15561556
"""
15571557
sfputil_helper = SfpUtilHelper()
15581558
sfputil_helper.read_porttab_mappings(self.__get_path_to_port_config_file())
1559-
print("self.index{}".format(self.index))
1560-
name = sfputil_helper.logical[self.index-1] or "Unknown"
1559+
name = sfputil_helper.physical_to_logical[self.index][0] or "Unknown"
15611560
return name
15621561

15631562
def get_model(self):
@@ -1618,4 +1617,4 @@ def get_error_description(self):
16181617
except OSError as e:
16191618
return "EEPROM read failed ({})".format(e.strerror)
16201619

1621-
return self.SFP_STATUS_OK
1620+
return self.SFP_STATUS_OK

0 commit comments

Comments
 (0)