Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c24c810

Browse files
author
Victor Stinner
committed
Issue #3080: Use %R to format module name in error messages
%R format instead of %U
1 parent 974389d commit c24c810

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Python/import.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2620,7 +2620,7 @@ PyImport_ImportModuleNoBlock(const char *name)
26202620
}
26212621
else {
26222622
PyErr_Format(PyExc_ImportError,
2623-
"Failed to import %U because the import lock"
2623+
"Failed to import %R because the import lock"
26242624
"is held by another thread.",
26252625
nameobj);
26262626
result = NULL;
@@ -3285,7 +3285,7 @@ PyImport_ReloadModule(PyObject *m)
32853285
parent = PyDict_GetItem(modules, parentname);
32863286
if (parent == NULL) {
32873287
PyErr_Format(PyExc_ImportError,
3288-
"reload(): parent %U not in sys.modules",
3288+
"reload(): parent %R not in sys.modules",
32893289
parentname);
32903290
Py_DECREF(parentname);
32913291
imp_modules_reloading_clear();

0 commit comments

Comments
 (0)