]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Uninitialized file type would lead to __exit__ lookup failure when site.py
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 31 May 2009 18:05:51 +0000 (18:05 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 31 May 2009 18:05:51 +0000 (18:05 +0000)
tries to read *.pth files on interpreter startup.

Objects/object.c

index 95072afc6e45b0844b3aae0e336acaa051ae77cb..0191ebe61d840f5aa6c516360d8573cd8aa29287 100644 (file)
@@ -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");
 }