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

CmisApi::get_application_advertisement catch AttributeError as well #316

Merged
merged 2 commits into from
Oct 30, 2022

Conversation

stephenxs
Copy link
Collaborator

@stephenxs stephenxs commented Oct 21, 2022

Description

Catch both TypeError and AttributeError in CmisApi::get_application_advertisement because an AttributeError will be thrown when updating a dict with None.

Motivation and Context

How Has This Been Tested?

Manually test
Added unit test

Additional Information (Optional)

Signed-off-by: Stephen Sun <stephens@nvidia.com>
@stephenxs stephenxs marked this pull request as draft October 21, 2022 02:33
@stephenxs stephenxs requested a review from keboliu October 21, 2022 02:42
Signed-off-by: Stephen Sun <stephens@nvidia.com>
@stephenxs stephenxs marked this pull request as ready for review October 21, 2022 05:55
@keboliu keboliu requested a review from prgeor October 24, 2022 09:35
@liat-grozovik
Copy link
Collaborator

@stephenxs thanks for the fix. do we also need it on 202205?
@prgeor can you please provide your feedback/signoff?

@stephenxs
Copy link
Collaborator Author

@stephenxs thanks for the fix. do we also need it on 202205? @prgeor can you please provide your feedback/signoff?

Yes. Label added.

@liat-grozovik liat-grozovik changed the title CmisApi catch AttributeError as well CmisApi::get_application_advertisement catch AttributeError as well Oct 30, 2022
@liat-grozovik liat-grozovik merged commit cf4c6af into sonic-net:master Oct 30, 2022
@stephenxs stephenxs deleted the xcvrd_cims_catch_attr_err branch October 30, 2022 08:38
yxieca pushed a commit that referenced this pull request Nov 3, 2022
…316)

- Description
Catch both TypeError and AttributeError in CmisApi::get_application_advertisement because an AttributeError will be thrown when updating a dict with None.

- Motivation and Context
Fix issue found during automation tests

- How Has This Been Tested?
Manually test
Added new unit test

Signed-off-by: Stephen Sun <stephens@nvidia.com>
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-platform-common that referenced this pull request Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants