Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AttributeError for "sfputil show error-status -hw" #291

Merged
merged 1 commit into from
Jul 12, 2022
Merged

Fix AttributeError for "sfputil show error-status -hw" #291

merged 1 commit into from
Jul 12, 2022

Conversation

chiourung
Copy link
Contributor

Description

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 chiourung_huang@edge-core.com

Motivation and Context

How Has This Been Tested?

admin@as9726-32d-1:~$ sudo sfputil show error-status -hw
Port         Error Status
-----------  --------------------
Ethernet0    OK (Not implemented)
Ethernet8    OK (Not implemented)
Ethernet16   OK (Not implemented)
Ethernet24   OK (Not implemented)
Ethernet32   OK (Not implemented)
Ethernet40   OK (Not implemented)
Ethernet48   OK (Not implemented)
Ethernet56   OK (Not implemented)
Ethernet64   OK (Not implemented)
Ethernet72   OK (Not implemented)
Ethernet80   OK (Not implemented)
Ethernet88   OK (Not implemented)
Ethernet96   OK (Not implemented)
Ethernet104  OK (Not implemented)
Ethernet112  OK (Not implemented)
Ethernet120  OK (Not implemented)
Ethernet128  OK (Not implemented)
Ethernet136  OK (Not implemented)
Ethernet144  OK (Not implemented)
Ethernet152  OK (Not implemented)
Ethernet160  OK (Not implemented)
Ethernet168  OK (Not implemented)
Ethernet176  OK (Not implemented)
Ethernet184  OK (Not implemented)
Ethernet192  OK (Not implemented)
Ethernet200  OK (Not implemented)
Ethernet208  OK (Not implemented)
Ethernet216  OK (Not implemented)
Ethernet224  OK (Not implemented)
Ethernet232  OK (Not implemented)
Ethernet240  OK (Not implemented)
Ethernet248  OK (Not implemented)
Ethernet256  OK (Not implemented)

Additional Information (Optional)

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 <chiourung_huang@edge-core.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants