summaryrefslogtreecommitdiffstats
path: root/Modules/_io/_iomodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_io/_iomodule.c')
-rw-r--r--Modules/_io/_iomodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c
index c0c8154..44bdac6 100644
--- a/Modules/_io/_iomodule.c
+++ b/Modules/_io/_iomodule.c
@@ -451,7 +451,7 @@ io_open(PyObject *self, PyObject *args, PyObject *kwds)
if (fileno == -1 && PyErr_Occurred())
goto error;
- if (fstat(fileno, &st) >= 0)
+ if (fstat(fileno, &st) >= 0 && st.st_blksize > 1)
buffering = st.st_blksize;
}
#endif