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 twasilczyk@spoon
Recipients Luke.Dunstan, V.E.O, amaury.forgeotdarc, christian.heimes, eaducac, m_python, mloskot, mont29, pitrou, tim.golden, tim.peters, twasilczyk@spoon, vstinner
Date 2015-01-29.13:15:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1422537332.69.0.507789909029.issue17797@psf.upfronthosting.co.za>
In-reply-to
Content
It seems that bug remains *not* fixed.

Just like eaducac pointed out, there are cases when underlying file handle is -2, which is not a valid file handle, but *is* a valid handle (which is GetCurrentThread).

Thus, provided dup solution accepts it, while it shouldn't. However, suggested GetStdHandle check still doesn't work for me. While working on the related Spoon issue, I've worked out a working solution (see the patch attached).

Tomek,
Spoon.net dev
History
Date User Action Args
2015-01-29 13:15:32twasilczyk@spoonsetrecipients: + twasilczyk@spoon, tim.peters, amaury.forgeotdarc, pitrou, vstinner, christian.heimes, tim.golden, eaducac, mloskot, V.E.O, m_python, mont29, Luke.Dunstan
2015-01-29 13:15:32twasilczyk@spoonsetmessageid: <1422537332.69.0.507789909029.issue17797@psf.upfronthosting.co.za>
2015-01-29 13:15:32twasilczyk@spoonlinkissue17797 messages
2015-01-29 13:15:32twasilczyk@spooncreate