Skip to content

Commit ac87a27

Browse files
akokhanjleveque
authored andcommitted
[xcvrd] Fixed SFP state update in case port is not in port_config.ini (sonic-net#47)
Signed-off-by: Andriy Kokhan <[email protected]>
1 parent a34ba13 commit ac87a27

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sonic-xcvrd/scripts/xcvrd

+3
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,9 @@ class sfp_state_update_task:
837837
# this is for the vendors who don't implement "system_not_ready/system_becom_ready" logic
838838
for key, value in port_dict.iteritems():
839839
logical_port_list = platform_sfputil.get_physical_to_logical(int(key))
840+
if logical_port_list is None:
841+
logger.log_warning("Got unknown FP port index {}, ignored".format(key))
842+
continue
840843
for logical_port in logical_port_list:
841844
if value == SFP_STATUS_INSERTED:
842845
logger.log_info("Got SFP inserted event")

0 commit comments

Comments
 (0)