Bug 1679498: unset variable 'bs'.

This commit is contained in:
Guido van Rossum 2007-03-18 03:36:28 +00:00
parent c819dea40d
commit bb09b21250
1 changed files with 2 additions and 0 deletions

View File

@ -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: