Skip to content
Snippets Groups Projects
Commit ee112eb6 authored by Matt Mackall's avatar Matt Mackall
Browse files

misc: adding missing file close() calls

Spotted by Victor Stinner <victor.stinner@haypocalc.com>
parent a708b65b
Branches
Tags
No related merge requests found
......@@ -78,6 +78,7 @@
pats[f] = []
fp = open(f)
pats[f], warnings = ignorepats(fp)
fp.close()
for warning in warnings:
warn("%s: %s\n" % (f, warning))
except IOError, inst:
......
......@@ -800,6 +800,7 @@
readahead = max(65536, length)
df.seek(offset)
d = df.read(readahead)
df.close()
self._addchunk(offset, d)
if readahead > length:
return d[:length]
......
......@@ -79,6 +79,7 @@
try:
cfg.read(filename, fp, sections=sections, remap=remap)
fp.close()
except error.ConfigError, inst:
if trusted:
raise
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment