##// END OF EJS Templates
remotefilelog: fix opening validatecachelog in text mode
Inada Naoki -
r44560:25097b4d default
parent child Browse files
Show More
@@ -225,7 +225,7 b' class basestore(object):'
225 data = shallowutil.readfile(filepath)
225 data = shallowutil.readfile(filepath)
226 if self._validatecache and not self._validatedata(data, filepath):
226 if self._validatecache and not self._validatedata(data, filepath):
227 if self._validatecachelog:
227 if self._validatecachelog:
228 with open(self._validatecachelog, b'a+') as f:
228 with open(self._validatecachelog, b'ab+') as f:
229 f.write(b"corrupt %s during read\n" % filepath)
229 f.write(b"corrupt %s during read\n" % filepath)
230 os.rename(filepath, filepath + b".corrupt")
230 os.rename(filepath, filepath + b".corrupt")
231 raise KeyError(b"corrupt local cache file %s" % filepath)
231 raise KeyError(b"corrupt local cache file %s" % filepath)
General Comments 0
You need to be logged in to leave comments. Login now