diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2011-08-22 06:19:19 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2011-08-22 06:19:19 (GMT) |
commit | c4a287114e2377772643e354fff5c388899cabff (patch) | |
tree | 86998b09aec41e2634825d47f72d61e78e11f491 /Lib/tabnanny.py | |
parent | 029ba2b8cd31728fb58dd082c44827a0703bff4a (diff) | |
download | cpython-c4a287114e2377772643e354fff5c388899cabff.zip cpython-c4a287114e2377772643e354fff5c388899cabff.tar.gz cpython-c4a287114e2377772643e354fff5c388899cabff.tar.bz2 |
Fix #12811 by closing files promptly in tabnanny.check. Patch by Anthony Briggs.
Diffstat (limited to 'Lib/tabnanny.py')
-rwxr-xr-x | Lib/tabnanny.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/tabnanny.py b/Lib/tabnanny.py index 46f8163..4a54f89 100755 --- a/Lib/tabnanny.py +++ b/Lib/tabnanny.py @@ -126,6 +126,9 @@ def check(file): else: print(file, badline, repr(line)) return + finally: + f.close() + if verbose: print("%r: Clean bill of health." % (file,)) |