From 43e967d6a466cb5cb98cf32faec8ca9125d3f5c0 Mon Sep 17 00:00:00 2001 From: Junchao-Mellanox <57339448+Junchao-Mellanox@users.noreply.github.com> Date: Thu, 27 Jan 2022 13:38:32 +0800 Subject: [PATCH] Fix issue: 'sx_port_mapping_t' object has no attribute 'slot_id' (#9835) - Why I did it Fix issue: 'sx_port_mapping_t' object has no attribute 'slot_id'. sx_port_mapping_t only has attribute slot. - How I did it Change slot_id to slot. - How to verify it Manual test --- platform/mellanox/mlnx-platform-api/sonic_platform/sfp_event.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/sfp_event.py b/platform/mellanox/mlnx-platform-api/sonic_platform/sfp_event.py index 519d038ff3..b06dd1b7e6 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/sfp_event.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/sfp_event.py @@ -367,7 +367,7 @@ class sfp_event: label_port = slot_id * DeviceDataManager.get_linecard_max_port_count() + x + 1 break - if port_attributes.port_mapping.slot_id == slot_id: + if port_attributes.port_mapping.slot == slot_id: x += 1 if label_port is not None: