Skip to content

Commit 6b8bf69

Browse files
authored
[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 <vdahiya@microsoft.com>
1 parent 2bcf936 commit 6b8bf69

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sonic-ycabled/ycable/ycable_utilities/y_cable_helper.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1526,7 +1526,7 @@ def post_port_mux_info_to_db(logical_port_name, table):
15261526
else:
15271527
mux_info_dict = get_muxcable_info(physical_port, logical_port_name)
15281528

1529-
if mux_info_dict is not None and mux_info_dict is not -1:
1529+
if mux_info_dict is not None and mux_info_dict != -1:
15301530
#transceiver_dict[physical_port] = port_info_dict
15311531
fvs = swsscommon.FieldValuePairs(
15321532
[('tor_active', mux_info_dict["tor_active"]),
@@ -1583,7 +1583,7 @@ def post_port_mux_static_info_to_db(logical_port_name, static_table):
15831583
mux_static_info_dict = get_muxcable_static_info(physical_port, logical_port_name)
15841584

15851585

1586-
if mux_static_info_dict is not None and mux_static_info_dict is not -1:
1586+
if mux_static_info_dict is not None and mux_static_info_dict != -1:
15871587
#transceiver_dict[physical_port] = port_info_dict
15881588
fvs = swsscommon.FieldValuePairs(
15891589
[('read_side', mux_static_info_dict["read_side"]),
@@ -2866,7 +2866,7 @@ def task_cli_worker(self):
28662866
helper_logger.log_notice("Y_CABLE_DEBUG: trying to enable/disable debug logs")
28672867
if fvp_m:
28682868

2869-
if key is "Y_CABLE":
2869+
if key == "Y_CABLE":
28702870
continue
28712871

28722872
fvp_dict = dict(fvp_m)

0 commit comments

Comments
 (0)