]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Bug #1415
authorChristian Heimes <christian@cheimes.de>
Sat, 10 Nov 2007 00:30:14 +0000 (00:30 +0000)
committerChristian Heimes <christian@cheimes.de>
Sat, 10 Nov 2007 00:30:14 +0000 (00:30 +0000)
commite018b305f6a4049b8832f712482cafec6beef5b7
tree944aff9e120608a0c2c997876dafc14894840a91
parent3ab4f651b906e47650c6b6de94ae23da08db4f58
Bug #1415

On Windows fileno(stdout) and fileno(stderr) can return an invalid file descriptor number (-2 on my machine). It happens only for pythonw.exe but not for python.exe.

Catch the problem ASAP in PyFile_NewStdPrinter(). I've also removed the call to PyErr_BadInternalCall(). It was causing a seg fault because the exceptions aren't available yet.
Objects/fileobject.c