mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #22831: Use "with" to avoid possible fd leaks.
This commit is contained in:
parent
ae2d667ae8
commit
46ba6c8563
10 changed files with 107 additions and 120 deletions
|
@ -1999,7 +1999,6 @@ class MozillaCookieJar(FileCookieJar):
|
|||
|
||||
magic = f.readline()
|
||||
if not self.magic_re.search(magic):
|
||||
f.close()
|
||||
raise LoadError(
|
||||
"%r does not look like a Netscape format cookies file" %
|
||||
filename)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue