From 6b8bf69be878b4abd970400c85460b5966e81d49 Mon Sep 17 00:00:00 2001 From: vdahiya12 <67608553+vdahiya12@users.noreply.github.com> Date: Fri, 27 May 2022 12:26:53 -0700 Subject: [PATCH] [ycabled] Fix some syntax warnings in ycabled (#263) This PR fixes some syntax warnings for ycabled. Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com Description Motivation and Context remove some syntax warnings How Has This Been Tested? UT coverage would test the change Signed-off-by: vaibhav-dahiya --- sonic-ycabled/ycable/ycable_utilities/y_cable_helper.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)