]> granicus.if.org Git - python/commit
sys_pyfile_write() does nothing if file is NULL
authorVictor Stinner <victor.stinner@haypocalc.com>
Tue, 8 Jun 2010 20:46:00 +0000 (20:46 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Tue, 8 Jun 2010 20:46:00 +0000 (20:46 +0000)
commitecccc4f9b888ddfba057119e33e03b4c1ffdfe0e
tree949d9d7cf82975a5d7d26db038aa079b375130e4
parent649124856aa994629e574c7a7ecf22d3b07f3ca0
sys_pyfile_write() does nothing if file is NULL

mywrite() falls back to the C file object if sys_pyfile_write() returns an
error. This patch fixes a segfault is Py_FatalError() is called in an early
stage of Python initialization.
Python/sysmodule.c