From 52ac8ac09705ffe4464ffd36dd5060537f9b40ec Mon Sep 17 00:00:00 2001 From: Stephen Sun <5379172+stephenxs@users.noreply.github.com> Date: Fri, 26 Aug 2022 05:26:02 +0800 Subject: [PATCH] Handle non-front-panel ports in is_rj45_port (#2327) * Handle non-front-panel ports in is_rj45_port Handle the cases that a port is not a front-panel port in is_rj45_port Add mock test to cover the logic Signed-off-by: Stephen Sun * Use APIs in sonic_platform_base Signed-off-by: Stephen Sun Signed-off-by: Stephen Sun --- utilities_common/platform_sfputil_helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities_common/platform_sfputil_helper.py b/utilities_common/platform_sfputil_helper.py index d73e9dd131..89ade3fc04 100644 --- a/utilities_common/platform_sfputil_helper.py +++ b/utilities_common/platform_sfputil_helper.py @@ -133,7 +133,7 @@ def is_rj45_port(port_name): port_type = None try: - physical_port = logical_port_name_to_physical_port_list(port_name) + physical_port = platform_sfputil.logical_port_name_to_physical_port_list(port_name) if physical_port: port_type = platform_chassis.get_port_or_cage_type(physical_port[0]) except Exception as e: