summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-05-31 18:05:51 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2009-05-31 18:05:51 (GMT)
commitd11f7fcc0f29df39595179c577da5ff83467fa5f (patch)
treeaa1289b1831994f912a3d3eda1b2a0dc1ffefa09 /Objects
parenteb88cb8cd44c52c9619b2137d501b8195ecebd79 (diff)
downloadcpython-d11f7fcc0f29df39595179c577da5ff83467fa5f.zip
cpython-d11f7fcc0f29df39595179c577da5ff83467fa5f.tar.gz
cpython-d11f7fcc0f29df39595179c577da5ff83467fa5f.tar.bz2
Uninitialized file type would lead to __exit__ lookup failure when site.py
tries to read *.pth files on interpreter startup.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/object.c3
1 files changed, 3 insertions, 0 deletions
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");
}