Skip to content

Commit baed70a

Browse files
authored
Fix AttributeError for "sfputil show error-status -hw" (sonic-net#291)
When insert trasnceiver which is not QSFP-DD, "sfputil show error-status -hw" would fail error: File "/usr/local/lib/python3.7/dist-packages/sonic_platform_base/sonic_xcvr/sfp_optoe_base.py", line 211, in get_error_description return api.get_error_description() if api is not None else None AttributeError: 'Sff8636Api' object has no attribute 'get_error_description' Signed-off-by: chiourung_huang <[email protected]>
1 parent 912797e commit baed70a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

sonic_platform_base/sonic_xcvr/api/xcvr_api.py

+12
Original file line numberDiff line numberDiff line change
@@ -463,3 +463,15 @@ def get_module_fw_info(self):
463463
result |tuple |firmware information
464464
"""
465465
raise NotImplementedError
466+
467+
def get_error_description(self):
468+
"""
469+
Retrives the error descriptions of the SFP module
470+
471+
Returns:
472+
String that represents the current error descriptions of vendor specific errors
473+
In case there are multiple errors, they should be joined by '|',
474+
like: "Bad EEPROM|Unsupported cable"
475+
"""
476+
raise NotImplementedError
477+

0 commit comments

Comments
 (0)