Commit 70370859 authored by Armin Rigo's avatar Armin Rigo

Forgot a case where the locals can now be a general mapping

instead of just a dictionary.  (backporting...)
parent ef583a49
......@@ -4046,8 +4046,10 @@ import_all_from(PyObject *locals, PyObject *v)
value = PyObject_GetAttr(v, name);
if (value == NULL)
err = -1;
else
else if (PyDict_CheckExact(locals))
err = PyDict_SetItem(locals, name, value);
else
err = PyObject_SetItem(locals, name, value);
Py_DECREF(name);
Py_XDECREF(value);
if (err != 0)
......
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