Open iritkatriel opened 1 month ago
In https://github.com/andfoy/pywinpty/blob/694ad0b498b23b3386d1e30296f82a734c014fe3/winpty/ptyprocess.py#L358 there is a break statement in a finally block, which would swallow any in-flight exception.
break
finally
This means that if any exception (including a BaseException such as KeyboardInterrupt) is raised from the try body, it will not propagate on as expected.
BaseException
KeyboardInterrupt
try
See also https://docs.python.org/3/tutorial/errors.html#defining-clean-up-actions.
In https://github.com/andfoy/pywinpty/blob/694ad0b498b23b3386d1e30296f82a734c014fe3/winpty/ptyprocess.py#L358 there is a
break
statement in afinally
block, which would swallow any in-flight exception.This means that if any exception (including a
BaseException
such asKeyboardInterrupt
) is raised from thetry
body, it will not propagate on as expected.See also https://docs.python.org/3/tutorial/errors.html#defining-clean-up-actions.