From ac2e3f7fc4c155ca48577fea39d073ec397ca2c5 Mon Sep 17 00:00:00 2001 From: Junchao-Mellanox Date: Fri, 14 Jun 2024 04:18:42 +0300 Subject: [PATCH] [xcvrd] Fix issue: do not print error log when module support non-ethernet application --- sonic-xcvrd/xcvrd/xcvrd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sonic-xcvrd/xcvrd/xcvrd.py b/sonic-xcvrd/xcvrd/xcvrd.py index c249bee67..72aff4900 100644 --- a/sonic-xcvrd/xcvrd/xcvrd.py +++ b/sonic-xcvrd/xcvrd/xcvrd.py @@ -160,6 +160,7 @@ def get_cmis_application_desired(api, host_lane_count, speed): get_interface_speed(app_info.get('host_electrical_interface_id')) == speed): return (index & 0xf) + helper_logger.log_error(f'Failed to get desired application from {appl_dict}') return None @@ -193,8 +194,7 @@ def get_interface_speed(ifname): speed = 10000 elif '1000BASE' in ifname: speed = 1000 - else: - helper_logger.log_error("No interface speed found for: '{}'".format(ifname)) + return speed