##// END OF EJS Templates
revlog: use context manager for data file lifetime in checksize...
Boris Feld -
r35990:82afb1a5 default
parent child Browse files
Show More
@@ -2335,10 +2335,9 b' class revlog(object):'
2335 2335 expected = max(0, self.end(len(self) - 1))
2336 2336
2337 2337 try:
2338 f = self._datafp()
2339 f.seek(0, 2)
2340 actual = f.tell()
2341 f.close()
2338 with self._datafp() as f:
2339 f.seek(0, 2)
2340 actual = f.tell()
2342 2341 dd = actual - expected
2343 2342 except IOError as inst:
2344 2343 if inst.errno != errno.ENOENT:
General Comments 0
You need to be logged in to leave comments. Login now