Skip to content

Commit

Permalink
[ycabled] Fix some syntax warnings in ycabled (#263)
Browse files Browse the repository at this point in the history
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 <vdahiya@microsoft.com>
  • Loading branch information
vdahiya12 authored May 27, 2022
1 parent 2bcf936 commit 6b8bf69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sonic-ycabled/ycable/ycable_utilities/y_cable_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]),
Expand Down Expand Up @@ -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"]),
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 6b8bf69

Please sign in to comment.