Commit 0227fc22 authored by Stefan Behnel's avatar Stefan Behnel

applied Py3 exception format patch by Lisandro

parent fa568114
...@@ -4274,11 +4274,12 @@ static int __Pyx_CheckKeywordStrings( ...@@ -4274,11 +4274,12 @@ static int __Pyx_CheckKeywordStrings(
} }
if (unlikely(!kw_allowed) && unlikely(key)) { if (unlikely(!kw_allowed) && unlikely(key)) {
PyErr_Format(PyExc_TypeError, PyErr_Format(PyExc_TypeError,
"'%s' is an invalid keyword argument for this function",
#if PY_MAJOR_VERSION < 3 #if PY_MAJOR_VERSION < 3
"'%s' is an invalid keyword argument for this function",
PyString_AsString(key)); PyString_AsString(key));
#else #else
PyUnicode_AsString(key)); "'%U' is an invalid keyword argument for this function",
key);
#endif #endif
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment