Commit c9345e38 authored by Anthony Sottile's avatar Anthony Sottile Committed by Serhiy Storchaka

bpo-37695: Correct unget_wch error message. (GH-14986)

parent 31c4fd2a
Correct :func:`curses.unget_wch` error message. Patch by Anthony Sottile.
......@@ -4176,7 +4176,7 @@ PyCurses_ConvertToWchar_t(PyObject *obj,
wchar_t buffer[2];
if (PyUnicode_AsWideChar(obj, buffer, 2) != 1) {
PyErr_Format(PyExc_TypeError,
"expect bytes or str of length 1, or int, "
"expect str of length 1 or int, "
"got a str of length %zi",
PyUnicode_GET_LENGTH(obj));
return 0;
......@@ -4203,7 +4203,7 @@ PyCurses_ConvertToWchar_t(PyObject *obj,
}
else {
PyErr_Format(PyExc_TypeError,
"expect bytes or str of length 1, or int, got %s",
"expect str of length 1 or int, got %s",
Py_TYPE(obj)->tp_name);
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