##// END OF EJS Templates
convert: fix a file descriptor leak...
Matt Harbison -
r39865:28626957 default
parent child Browse files
Show More
@@ -18,6 +18,7 b' from mercurial import ('
18 encoding,
18 encoding,
19 error,
19 error,
20 pycompat,
20 pycompat,
21 util,
21 )
22 )
22 from mercurial.utils import (
23 from mercurial.utils import (
23 dateutil,
24 dateutil,
@@ -228,7 +229,7 b' class gnuarch_source(common.converter_so'
228 else:
229 else:
229 mode = ''
230 mode = ''
230 else:
231 else:
231 data = open(os.path.join(self.tmppath, name), 'rb').read()
232 data = util.readfile(os.path.join(self.tmppath, name))
232 mode = (mode & 0o111) and 'x' or ''
233 mode = (mode & 0o111) and 'x' or ''
233 return data, mode
234 return data, mode
234
235
General Comments 0
You need to be logged in to leave comments. Login now