Bug 1679498: unset variable 'bs'.
diff --git a/Lib/io.py b/Lib/io.py
index e4e6759..59c4b06 100644
--- a/Lib/io.py
+++ b/Lib/io.py
@@ -91,6 +91,8 @@
         try:
             bs = os.fstat(raw.fileno()).st_blksize
         except (os.error, AttributeError):
+            pass
+        else:
             if bs > 1:
                 buffering = bs
     if buffering < 0: