diff --git a/sonic-ycabled/ycable/ycable_utilities/y_cable_helper.py b/sonic-ycabled/ycable/ycable_utilities/y_cable_helper.py index b9208ac915bd..3504e111992c 100644 --- a/sonic-ycabled/ycable/ycable_utilities/y_cable_helper.py +++ b/sonic-ycabled/ycable/ycable_utilities/y_cable_helper.py @@ -1526,7 +1526,7 @@ def post_port_mux_info_to_db(logical_port_name, table): else: mux_info_dict = get_muxcable_info(physical_port, logical_port_name) - if mux_info_dict is not None and mux_info_dict is not -1: + if mux_info_dict is not None and mux_info_dict != -1: #transceiver_dict[physical_port] = port_info_dict fvs = swsscommon.FieldValuePairs( [('tor_active', mux_info_dict["tor_active"]), @@ -1583,7 +1583,7 @@ def post_port_mux_static_info_to_db(logical_port_name, static_table): mux_static_info_dict = get_muxcable_static_info(physical_port, logical_port_name) - if mux_static_info_dict is not None and mux_static_info_dict is not -1: + if mux_static_info_dict is not None and mux_static_info_dict != -1: #transceiver_dict[physical_port] = port_info_dict fvs = swsscommon.FieldValuePairs( [('read_side', mux_static_info_dict["read_side"]), @@ -2866,7 +2866,7 @@ def task_cli_worker(self): helper_logger.log_notice("Y_CABLE_DEBUG: trying to enable/disable debug logs") if fvp_m: - if key is "Y_CABLE": + if key == "Y_CABLE": continue fvp_dict = dict(fvp_m)