summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lib/io.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/io.py b/Lib/io.py
index e4e6759687..59c4b06234 100644
--- a/Lib/io.py
+++ b/Lib/io.py
@@ -91,6 +91,8 @@ def open(filename, mode="r", buffering=None, *, encoding=None):
try:
bs = os.fstat(raw.fileno()).st_blksize
except (os.error, AttributeError):
+ pass
+ else:
if bs > 1:
buffering = bs
if buffering < 0: