summaryrefslogtreecommitdiffstats
path: root/Lib/http/cookiejar.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-04-04 08:01:02 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-04-04 08:01:02 (GMT)
commit46ba6c8563922f043cad6423202ee0119614c807 (patch)
tree4523d1a3665af25ef77898f7d2da186fbdca8ce7 /Lib/http/cookiejar.py
parentae2d667ae83548029fed7244619fadd7f625cb24 (diff)
downloadcpython-46ba6c8563922f043cad6423202ee0119614c807.zip
cpython-46ba6c8563922f043cad6423202ee0119614c807.tar.gz
cpython-46ba6c8563922f043cad6423202ee0119614c807.tar.bz2
Issue #22831: Use "with" to avoid possible fd leaks.
Diffstat (limited to 'Lib/http/cookiejar.py')
-rw-r--r--Lib/http/cookiejar.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/Lib/http/cookiejar.py b/Lib/http/cookiejar.py
index cc9e0be..d54f58a 100644
--- a/Lib/http/cookiejar.py
+++ b/Lib/http/cookiejar.py
@@ -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)