Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix compatibility when SIGINT handler is installed by non-Python
When a native (Rust, C) program installs SIGINT handler and calls into Python, `signal.getsignal` can return `None`, which is not a valid value for the 2nd parameter of `signal.signal`. Fix it by checking `None` explicitly.