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

[action] [PR:518] get_error_description should return 'OK' instead of None when there is no error (#518) #524

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sonic_platform_base/sonic_xcvr/api/public/cmis.py
Original file line number Diff line number Diff line change
Expand Up @@ -2724,6 +2724,6 @@ def get_error_description(self):
if state != CmisCodes.MODULE_STATE[3]:
return state

return None
return 'OK'

# TODO: other XcvrApi methods
2 changes: 1 addition & 1 deletion tests/sonic_xcvr/test_cmis.py
Original file line number Diff line number Diff line change
Expand Up @@ -2664,7 +2664,7 @@ def test_get_error_description(self):
self.api.xcvr_eeprom.read.return_value = 0x10

result = self.api.get_error_description()
assert result is None
assert result is 'OK'

def test_random_read_fail(self):
def mock_read_raw(offset, size):
Expand Down
Loading