From 1893c4049531194c8937af31a7cd25cb19852834 Mon Sep 17 00:00:00 2001 From: Abhishek Dosi Date: Tue, 8 Sep 2020 09:46:44 -0700 Subject: [PATCH] Fix the xcvrd theowing error on sfprecover function on getKeys() not valid. Signed-off-by: Abhishek Dosi --- sonic-xcvrd/scripts/xcvrd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonic-xcvrd/scripts/xcvrd b/sonic-xcvrd/scripts/xcvrd index b59acdbc3..3095ebe2a 100644 --- a/sonic-xcvrd/scripts/xcvrd +++ b/sonic-xcvrd/scripts/xcvrd @@ -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(): @@ -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)