Skip to content

Commit c9345e3

Browse files
asottileserhiy-storchaka
authored andcommitted
bpo-37695: Correct unget_wch error message. (GH-14986)
1 parent 31c4fd2 commit c9345e3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Correct :func:`curses.unget_wch` error message. Patch by Anthony Sottile.

Modules/_cursesmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4176,7 +4176,7 @@ PyCurses_ConvertToWchar_t(PyObject *obj,
41764176
wchar_t buffer[2];
41774177
if (PyUnicode_AsWideChar(obj, buffer, 2) != 1) {
41784178
PyErr_Format(PyExc_TypeError,
4179-
"expect bytes or str of length 1, or int, "
4179+
"expect str of length 1 or int, "
41804180
"got a str of length %zi",
41814181
PyUnicode_GET_LENGTH(obj));
41824182
return 0;
@@ -4203,7 +4203,7 @@ PyCurses_ConvertToWchar_t(PyObject *obj,
42034203
}
42044204
else {
42054205
PyErr_Format(PyExc_TypeError,
4206-
"expect bytes or str of length 1, or int, got %s",
4206+
"expect str of length 1 or int, got %s",
42074207
Py_TYPE(obj)->tp_name);
42084208
return 0;
42094209
}

0 commit comments

Comments
 (0)