Skip to content

Commit 8d761ff

Browse files
committed
remove extra PyErr_Format arguments (closes python#28454)
Patch from Xiang Zhang.
1 parent 90e0289 commit 8d761ff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Objects/unicodeobject.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3009,7 +3009,7 @@ PyUnicode_Decode(const char *s,
30093009
"'%.400s' decoder returned '%.400s' instead of 'str'; "
30103010
"use codecs.decode() to decode to arbitrary types",
30113011
encoding,
3012-
Py_TYPE(unicode)->tp_name, Py_TYPE(unicode)->tp_name);
3012+
Py_TYPE(unicode)->tp_name);
30133013
Py_DECREF(unicode);
30143014
goto onError;
30153015
}
@@ -3070,7 +3070,7 @@ PyUnicode_AsDecodedUnicode(PyObject *unicode,
30703070
"'%.400s' decoder returned '%.400s' instead of 'str'; "
30713071
"use codecs.decode() to decode to arbitrary types",
30723072
encoding,
3073-
Py_TYPE(unicode)->tp_name, Py_TYPE(unicode)->tp_name);
3073+
Py_TYPE(unicode)->tp_name);
30743074
Py_DECREF(v);
30753075
goto onError;
30763076
}
@@ -3398,7 +3398,7 @@ PyUnicode_AsEncodedString(PyObject *unicode,
33983398
"'%.400s' encoder returned '%.400s' instead of 'bytes'; "
33993399
"use codecs.encode() to encode to arbitrary types",
34003400
encoding,
3401-
Py_TYPE(v)->tp_name, Py_TYPE(v)->tp_name);
3401+
Py_TYPE(v)->tp_name);
34023402
Py_DECREF(v);
34033403
return NULL;
34043404
}
@@ -3427,7 +3427,7 @@ PyUnicode_AsEncodedUnicode(PyObject *unicode,
34273427
"'%.400s' encoder returned '%.400s' instead of 'str'; "
34283428
"use codecs.encode() to encode to arbitrary types",
34293429
encoding,
3430-
Py_TYPE(v)->tp_name, Py_TYPE(v)->tp_name);
3430+
Py_TYPE(v)->tp_name);
34313431
Py_DECREF(v);
34323432
goto onError;
34333433
}

0 commit comments

Comments
 (0)