applied Py3 exception format patch by Lisandro
authorStefan Behnel <scoder@users.berlios.de>
Tue, 12 Aug 2008 19:24:39 +0000 (21:24 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Tue, 12 Aug 2008 19:24:39 +0000 (21:24 +0200)
Cython/Compiler/Nodes.py

index 266fc4d6460d4f26aa784f029a2cf865b1b86d8f..555e3fd2d587f0f9948d3bffdc6ae71b94c4a48f 100644 (file)
@@ -4274,11 +4274,12 @@ static int __Pyx_CheckKeywordStrings(
     }
     if (unlikely(!kw_allowed) && unlikely(key)) {
         PyErr_Format(PyExc_TypeError,
-                     "'%s' is an invalid keyword argument for this function",
         #if PY_MAJOR_VERSION < 3
+                     "'%s' is an invalid keyword argument for this function",
                      PyString_AsString(key));
         #else
-                     PyUnicode_AsString(key));
+                     "'%U' is an invalid keyword argument for this function",
+                     key);
         #endif
         return 0;
     }