mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Issue #3080: Use %R to format module name in error messages
%R format instead of %U
This commit is contained in:
parent
974389d92c
commit
c24c8108b6
1 changed files with 2 additions and 2 deletions
|
@ -2620,7 +2620,7 @@ PyImport_ImportModuleNoBlock(const char *name)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
PyErr_Format(PyExc_ImportError,
|
PyErr_Format(PyExc_ImportError,
|
||||||
"Failed to import %U because the import lock"
|
"Failed to import %R because the import lock"
|
||||||
"is held by another thread.",
|
"is held by another thread.",
|
||||||
nameobj);
|
nameobj);
|
||||||
result = NULL;
|
result = NULL;
|
||||||
|
@ -3285,7 +3285,7 @@ PyImport_ReloadModule(PyObject *m)
|
||||||
parent = PyDict_GetItem(modules, parentname);
|
parent = PyDict_GetItem(modules, parentname);
|
||||||
if (parent == NULL) {
|
if (parent == NULL) {
|
||||||
PyErr_Format(PyExc_ImportError,
|
PyErr_Format(PyExc_ImportError,
|
||||||
"reload(): parent %U not in sys.modules",
|
"reload(): parent %R not in sys.modules",
|
||||||
parentname);
|
parentname);
|
||||||
Py_DECREF(parentname);
|
Py_DECREF(parentname);
|
||||||
imp_modules_reloading_clear();
|
imp_modules_reloading_clear();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue