Skip to content

Commit 65fa443

Browse files
authored
Merge pull request sonic-net#90 from abdosi/multiasic-fix
Fix the xcvrd throwing error on sfprecover function
2 parents e4ee852 + 1893c40 commit 65fa443

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sonic-xcvrd/scripts/xcvrd

+1-1
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,6 @@ def del_port_sfp_dom_info_from_db(logical_port_name, int_tbl, dom_tbl):
488488
def recover_missing_sfp_table_entries(sfp_util, int_tbl, status_tbl, stop_event):
489489
transceiver_dict = {}
490490

491-
keys = int_tbl.getKeys()
492491
logical_port_list = sfp_util.logical
493492
for logical_port_name in logical_port_list:
494493
if stop_event.is_set():
@@ -500,6 +499,7 @@ def recover_missing_sfp_table_entries(sfp_util, int_tbl, status_tbl, stop_event)
500499
logger.log_warning("Got invalid asic index for {}, ignored".format(logical_port_name))
501500
continue
502501

502+
keys = int_tbl[asic_index].getKeys()
503503
if logical_port_name not in keys and not detect_port_in_error_status(logical_port_name, status_tbl[asic_index]):
504504
post_port_sfp_info_to_db(logical_port_name, int_tbl[asic_index], transceiver_dict, stop_event)
505505

0 commit comments

Comments
 (0)