From bb09b212505a70a2b9f43ee2df6dd3ddb09776c1 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sun, 18 Mar 2007 03:36:28 +0000 Subject: [PATCH] Bug 1679498: unset variable 'bs'. --- Lib/io.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/io.py b/Lib/io.py index e4e67596872..59c4b062348 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: