]> granicus.if.org Git - python/commitdiff
Bug 1679498: unset variable 'bs'.
authorGuido van Rossum <guido@python.org>
Sun, 18 Mar 2007 03:36:28 +0000 (03:36 +0000)
committerGuido van Rossum <guido@python.org>
Sun, 18 Mar 2007 03:36:28 +0000 (03:36 +0000)
Lib/io.py

index e4e6759687244ee8f1bd3647b454486c7ece0fa5..59c4b062348115c48acf89669043bc0806d2eff6 100644 (file)
--- 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: