Commit e02984da authored by Moshe Zadka's avatar Moshe Zadka

Patch number #422106 by Greg Ball, to fix segmentation

fault in sys.displayhook.

Please check this in on the 2.2a1 branch (or whatever is necessary
to get it working next release)
parent 0571eb2c
......@@ -75,6 +75,11 @@ sys_displayhook(PyObject *self, PyObject *args)
PyObject *modules = interp->modules;
PyObject *builtins = PyDict_GetItemString(modules, "__builtin__");
if (builtins == NULL) {
PyErr_SetString(PyExc_RuntimeError, "lost __builtin__");
return NULL;
}
/* parse arguments */
if (!PyArg_ParseTuple(args, "O:displayhook", &o))
return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment