equal
deleted
inserted
replaced
223 filepath = self._getfilepath(name, node) |
223 filepath = self._getfilepath(name, node) |
224 try: |
224 try: |
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) |
232 except IOError: |
232 except IOError: |
233 raise KeyError( |
233 raise KeyError( |