bpo-39393: Misleading error message on dependent DLL resolution failure (GH-18093)

This commit is contained in:
Zackery Spytz 2020-01-28 02:42:43 -07:00 committed by Steve Dower
parent c45a2aa9e2
commit 13c1c3556f
2 changed files with 5 additions and 2 deletions

View File

@ -0,0 +1,2 @@
Improve the error message when attempting to load a DLL with unresolved
dependencies.

View File

@ -1311,8 +1311,9 @@ static PyObject *load_library(PyObject *self, PyObject *args)
if (err == ERROR_MOD_NOT_FOUND) {
PyErr_Format(PyExc_FileNotFoundError,
("Could not find module '%.500S'. Try using "
"the full path with constructor syntax."),
("Could not find module '%.500S' (or one of its "
"dependencies). Try using the full path with "
"constructor syntax."),
nameobj);
return NULL;
} else if (err) {