Anton Barkovsky <swarmer...@gmail.com> added the comment: I think I've found the root cause.
On my system (also tested in 3.2) /dev/tty is opened successfully, but wrapping it in io.BufferedRandom fails. By the time the exception is raised, FileIO object is already created, and then it immediately gets deleted. I'm attaching a patch that closes the file explicitly in this case. Be extra careful when reviewing though - this is the first time I'm touching Python's C code. ---------- Added file: http://bugs.python.org/file26498/closewarning.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11466> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com