diff options
| author | Nick Coghlan <ncoghlan@gmail.com> | 2011-08-22 16:19:19 +1000 |
|---|---|---|
| committer | Nick Coghlan <ncoghlan@gmail.com> | 2011-08-22 16:19:19 +1000 |
| commit | c4a287114e2377772643e354fff5c388899cabff (patch) | |
| tree | 86998b09aec41e2634825d47f72d61e78e11f491 /Lib/tabnanny.py | |
| parent | 029ba2b8cd31728fb58dd082c44827a0703bff4a (diff) | |
| download | cpython-git-c4a287114e2377772643e354fff5c388899cabff.tar.gz | |
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 46f8163e5f..4a54f89e82 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,)) |
