◐ Shell
clean mode source ↗

Message 185633 - Python tracker

Terry, I agree that the original patch introduces a buggy fileno and it "knows" too much about the internals of site.py which could change.

The attached patch modifies site.py, similar to how Nick Coghlan split the two function calls in a single try/except block into two separate try/except blocks. I tried to keep the change as small as possible to avoid introducing any unintended regressions. The change does pass the test suite on 3.4 on Linux.