Skip to content

Commit 510d330

Browse files
Fix typo in xcvrd (sonic-net#313)
1 parent 9ae551f commit 510d330

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

sonic-xcvrd/xcvrd/xcvrd.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -616,9 +616,9 @@ def del_port_sfp_dom_info_from_db(logical_port_name, port_mapping, int_tbl, dom_
616616
ganged_member_num += 1
617617

618618
try:
619-
if int_tbl != None:
619+
if int_tbl is not None:
620620
int_tbl._del(port_name)
621-
if dom_tbl != None:
621+
if dom_tbl is not None:
622622
dom_tbl._del(port_name)
623623

624624
except NotImplementedError:
@@ -1923,7 +1923,10 @@ def task_worker(self, stopping_event, sfp_error_event):
19231923
# In this case EEPROM is not accessible. The DOM info will be removed since it can be out-of-date.
19241924
# The interface info remains in the DB since it is static.
19251925
if sfp_status_helper.is_error_block_eeprom_reading(error_bits):
1926-
del_port_sfp_dom_info_from_db(logical_port, None, self.xcvr_table_helper.get_dom_tbl(asic_index))
1926+
del_port_sfp_dom_info_from_db(logical_port,
1927+
self.port_mapping,
1928+
None,
1929+
self.xcvr_table_helper.get_dom_tbl(asic_index))
19271930
except (TypeError, ValueError) as e:
19281931
helper_logger.log_error("Got unrecognized event {}, ignored".format(value))
19291932

0 commit comments

Comments
 (0)