merge 3.5 (#28184)
diff --git a/Modules/_io/winconsoleio.c b/Modules/_io/winconsoleio.c
index 7d13be5..0bf4ddf 100644
--- a/Modules/_io/winconsoleio.c
+++ b/Modules/_io/winconsoleio.c
@@ -44,7 +44,7 @@
if (handle == INVALID_HANDLE_VALUE)
return '\0';
-
+
if (!GetConsoleMode(handle, &mode))
return '\0';
@@ -803,7 +803,7 @@
bytes_size = WideCharToMultiByte(CP_UTF8, 0, buf, len,
NULL, 0, NULL, NULL);
Py_END_ALLOW_THREADS
-
+
if (!bytes_size) {
DWORD err = GetLastError();
PyMem_Free(buf);
@@ -854,7 +854,7 @@
{
PyObject *bytes;
Py_ssize_t bytes_size;
-
+
if (self->handle == INVALID_HANDLE_VALUE)
return err_closed();
if (!self->readable)
@@ -929,7 +929,7 @@
wlen = MultiByteToWideChar(CP_UTF8, 0, b->buf, len, NULL, 0);
}
Py_END_ALLOW_THREADS
-
+
if (!wlen)
return PyErr_SetFromWindowsErr(0);
@@ -956,7 +956,7 @@
} else
res = 0;
Py_END_ALLOW_THREADS
-
+
if (!res) {
DWORD err = GetLastError();
PyMem_Free(wbuf);
@@ -996,7 +996,7 @@
{
if (self->handle == INVALID_HANDLE_VALUE)
return err_closed();
-
+
Py_RETURN_TRUE;
}