commit | c4a287114e2377772643e354fff5c388899cabff | [log] [tgz] |
---|---|---|
author | Nick Coghlan <ncoghlan@gmail.com> | Mon Aug 22 16:19:19 2011 +1000 |
committer | Nick Coghlan <ncoghlan@gmail.com> | Mon Aug 22 16:19:19 2011 +1000 |
tree | 86998b09aec41e2634825d47f72d61e78e11f491 | |
parent | 029ba2b8cd31728fb58dd082c44827a0703bff4a [diff] |
Fix #12811 by closing files promptly in tabnanny.check. Patch by Anthony Briggs.
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 @@ else: print(file, badline, repr(line)) return + finally: + f.close() + if verbose: print("%r: Clean bill of health." % (file,))