summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 5b810f2..8cc5094 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -4935,13 +4935,12 @@ import_from(PyObject *v, PyObject *name)
Py_DECREF(pkgname);
return NULL;
}
- x = PyDict_GetItem(PyImport_GetModuleDict(), fullmodname);
+ x = PyImport_GetModule(fullmodname);
Py_DECREF(fullmodname);
if (x == NULL) {
goto error;
}
Py_DECREF(pkgname);
- Py_INCREF(x);
return x;
error:
pkgpath = PyModule_GetFilenameObject(v);