##// END OF EJS Templates
misc: adding missing file close() calls...
Matt Mackall -
r15407:ee112eb6 stable
parent child Browse files
Show More
@@ -78,6 +78,7 b' def ignore(root, files, warn):'
78 pats[f] = []
78 pats[f] = []
79 fp = open(f)
79 fp = open(f)
80 pats[f], warnings = ignorepats(fp)
80 pats[f], warnings = ignorepats(fp)
81 fp.close()
81 for warning in warnings:
82 for warning in warnings:
82 warn("%s: %s\n" % (f, warning))
83 warn("%s: %s\n" % (f, warning))
83 except IOError, inst:
84 except IOError, inst:
@@ -800,6 +800,7 b' class revlog(object):'
800 readahead = max(65536, length)
800 readahead = max(65536, length)
801 df.seek(offset)
801 df.seek(offset)
802 d = df.read(readahead)
802 d = df.read(readahead)
803 df.close()
803 self._addchunk(offset, d)
804 self._addchunk(offset, d)
804 if readahead > length:
805 if readahead > length:
805 return d[:length]
806 return d[:length]
@@ -79,6 +79,7 b' class ui(object):'
79
79
80 try:
80 try:
81 cfg.read(filename, fp, sections=sections, remap=remap)
81 cfg.read(filename, fp, sections=sections, remap=remap)
82 fp.close()
82 except error.ConfigError, inst:
83 except error.ConfigError, inst:
83 if trusted:
84 if trusted:
84 raise
85 raise
General Comments 0
You need to be logged in to leave comments. Login now