]> granicus.if.org Git - python/commitdiff
Issue #3080: Use %R to format module name in error messages
authorVictor Stinner <victor.stinner@haypocalc.com>
Mon, 14 Mar 2011 02:38:06 +0000 (22:38 -0400)
committerVictor Stinner <victor.stinner@haypocalc.com>
Mon, 14 Mar 2011 02:38:06 +0000 (22:38 -0400)
%R format instead of %U

Python/import.c

index 95faeee5d88a92fa3d461e3f4a4943acc5c54f37..90ba4b5e2208c730b0361699b60ffa01882cf721 100644 (file)
@@ -2620,7 +2620,7 @@ PyImport_ImportModuleNoBlock(const char *name)
     }
     else {
         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.",
                      nameobj);
         result = NULL;
@@ -3285,7 +3285,7 @@ PyImport_ReloadModule(PyObject *m)
         parent = PyDict_GetItem(modules, parentname);
         if (parent == NULL) {
             PyErr_Format(PyExc_ImportError,
-                "reload(): parent %U not in sys.modules",
+                "reload(): parent %R not in sys.modules",
                  parentname);
             Py_DECREF(parentname);
             imp_modules_reloading_clear();