From: Guido van Rossum Date: Sun, 18 Mar 2007 03:36:28 +0000 (+0000) Subject: Bug 1679498: unset variable 'bs'. X-Git-Tag: v3.0a1~1120 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bb09b212505a70a2b9f43ee2df6dd3ddb09776c1;p=thirdparty%2FPython%2Fcpython.git Bug 1679498: unset variable 'bs'. --- diff --git a/Lib/io.py b/Lib/io.py index e4e675968724..59c4b0623481 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: