mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Fix #12811 by closing files promptly in tabnanny.check. Patch by Anthony Briggs.
This commit is contained in:
parent
029ba2b8cd
commit
c4a287114e
3 changed files with 7 additions and 0 deletions
|
@ -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,))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue