Commit dce345c5 authored by Anthony Sottile's avatar Anthony Sottile Committed by Barry Warsaw

Simplify sys.breakpointhook implementation (#9519)

parent bf46a09d
......@@ -151,16 +151,8 @@ sys_breakpointhook(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyOb
return NULL;
}
PyObject *fromlist = Py_BuildValue("(s)", attrname);
if (fromlist == NULL) {
Py_DECREF(modulepath);
PyMem_RawFree(envar);
return NULL;
}
PyObject *module = PyImport_ImportModuleLevelObject(
modulepath, NULL, NULL, fromlist, 0);
PyObject *module = PyImport_Import(modulepath);
Py_DECREF(modulepath);
Py_DECREF(fromlist);
if (module == NULL) {
goto error;
......
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