From: Antoine Pitrou Date: Sun, 31 May 2009 18:05:51 +0000 (+0000) Subject: Uninitialized file type would lead to __exit__ lookup failure when site.py X-Git-Tag: v2.7a1~1056 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d11f7fcc0f29df39595179c577da5ff83467fa5f;p=thirdparty%2FPython%2Fcpython.git Uninitialized file type would lead to __exit__ lookup failure when site.py tries to read *.pth files on interpreter startup. --- diff --git a/Objects/object.c b/Objects/object.c index 95072afc6e45..0191ebe61d84 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -2156,6 +2156,9 @@ _Py_ReadyTypes(void) if (PyType_Ready(&PyMemberDescr_Type) < 0) Py_FatalError("Can't initialize member descriptor type"); + + if (PyType_Ready(&PyFile_Type) < 0) + Py_FatalError("Can't initialize file type"); }