diff options
author | Armin Rigo <arigo@tunes.org> | 2006-11-29 21:59:22 (GMT) |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2006-11-29 21:59:22 (GMT) |
commit | 7037085959cbdb8717c342afe8bcfb7d2301c58d (patch) | |
tree | 41eeeeb80132b0bf5793023e1f1f9892116b7aa9 /Python/ceval.c | |
parent | ef583a4992d8d7c635e77eb1a3af2b12f46fed50 (diff) | |
download | cpython-7037085959cbdb8717c342afe8bcfb7d2301c58d.zip cpython-7037085959cbdb8717c342afe8bcfb7d2301c58d.tar.gz cpython-7037085959cbdb8717c342afe8bcfb7d2301c58d.tar.bz2 |
Forgot a case where the locals can now be a general mapping
instead of just a dictionary. (backporting...)
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 73e8dee..7884051 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -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) |