Skip to content

Fix issue: should always check return value of a function if the function may return None#20

Closed
Junchao-Mellanox wants to merge 2 commits intomasterfrom
fix-crash
Closed

Fix issue: should always check return value of a function if the function may return None#20
Junchao-Mellanox wants to merge 2 commits intomasterfrom
fix-crash

Conversation

@Junchao-Mellanox
Copy link
Copy Markdown
Owner

@Junchao-Mellanox Junchao-Mellanox commented Feb 23, 2023

Description

When a function may return None, caller should always check the return value before using it. This PR is to fix such issues in sonic-xcvr.

Motivation and Context

When a function may return None, caller should always check the return value before using it. This PR is to fix such issues in sonic-xcvr.

How Has This Been Tested?

Created unit test cases to avoid such thing happening

Additional Information (Optional)

@Junchao-Mellanox
Copy link
Copy Markdown
Owner Author

CI passed

Junchao-Mellanox pushed a commit that referenced this pull request Mar 20, 2025
… 202412 (#20)

```<br>* a185761 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-platform-common into 202412 (2025-02-14) [Sonic Automation]
* c735073 - (origin/202411) [202411][cmis] Fix cmis.get_error_description speed for passive module (sonic-net#538) (2025-02-12) [Aryeh Feigin]
* b7e75d8 - Add 800G innolight PNs (sonic-net#540) (2025-02-07) [mssonicbld]<br>```
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