From d11f7fcc0f29df39595179c577da5ff83467fa5f Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sun, 31 May 2009 18:05:51 +0000 Subject: Uninitialized file type would lead to __exit__ lookup failure when site.py tries to read *.pth files on interpreter startup. --- Objects/object.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Objects/object.c b/Objects/object.c index 95072af..0191ebe 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"); } -- cgit v0.12