return in finally swallows exceptions
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 48/100
Research direction
Start by reading tencentcloud/common/credential.py at line 122 and the linked Python cleanup-actions documentation. Verify how exceptions from the try body and except clause behave around the finally block. Done means those exceptions propagate instead of being swallowed.
Written by the indexing model from the issue text.
Description
In https://github.com/TencentCloud/tencentcloud-sdk-python/blob/258662e27ed87c3e644447f5a441fedbf773cc40/tencentcloud/common/credential.py#L122 there is a return statement in a finally block, which would swallow any in-flight exception.
This means that if an unhandled exception (including a BaseException such as KeyboardInterrupt) is raised from the try body, or any exception is raised from an except: clause, it will not propagate on as expected.
See also https://docs.python.org/3/tutorial/errors.html#defining-clean-up-actions.
- Dominant language
- Python
- Stars
- 713
- Forks
- 252
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from TencentCloud/tencentcloud-sdk-python
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
TencentCloud/tencentcloud-sdk-python#229 · 2 reactions ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
一句话识别异步调用 Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
TencentCloud/tencentcloud-sdk-python#191 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
TencentCloud/tencentcloud-sdk-python#154 · 2 comments ·
All issues in TencentCloud/tencentcloud-sdk-python
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100