This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author anton.barkovsky
Recipients anton.barkovsky, eric.araujo, gregory.p.smith, orsenthil
Date 2012-07-24.14:22:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1343139722.48.0.669514028104.issue11466@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-07-24 14:22:02anton.barkovskysetrecipients: + anton.barkovsky, gregory.p.smith, orsenthil, eric.araujo
2012-07-24 14:22:02anton.barkovskysetmessageid: <1343139722.48.0.669514028104.issue11466@psf.upfronthosting.co.za>
2012-07-24 14:22:01anton.barkovskylinkissue11466 messages
2012-07-24 14:22:01anton.barkovskycreate