Kaydet (Commit) 925ef399 authored tarafından Victor Stinner's avatar Victor Stinner

find_module_path_list() fails if _Py_fopen() failed and raised an exception

(UnicodeEncodeError).
üst 7edb5dfc
......@@ -1908,6 +1908,10 @@ find_module_path_list(PyObject *fullname, PyObject *name,
fp = _Py_fopen(filename, filemode);
if (fp == NULL) {
Py_DECREF(filename);
if (PyErr_Occurred()) {
Py_DECREF(prefix);
return NULL;
}
continue;
}
match = case_ok(filename, -(Py_ssize_t)strlen(fdp->suffix), name);
......
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