pyperform
pyperform copied to clipboard
return in finally swallows exceptions
In https://github.com/lobocv/pyperform/blob/97d87e8b9ddb35bd8f2a6782965fd7735ab0349f/pyperform/thread.py#L74 there is a return statement in a finally block, which would swallow any in-flight exception.
This means that if 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.