Skip to content

Commit

Permalink
Fix the xcvrd theowing error on sfprecover function
Browse files Browse the repository at this point in the history
on getKeys() not valid.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
  • Loading branch information
abdosi committed Sep 8, 2020
1 parent e4ee852 commit 1893c40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sonic-xcvrd/scripts/xcvrd
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,6 @@ def del_port_sfp_dom_info_from_db(logical_port_name, int_tbl, dom_tbl):
def recover_missing_sfp_table_entries(sfp_util, int_tbl, status_tbl, stop_event):
transceiver_dict = {}

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

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

Expand Down

0 comments on commit 1893c40

Please sign in to comment.