MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / _checkcache

Method _checkcache

lib/core/bigarray.py:202–217  ·  view source on GitHub ↗
(self, index)

Source from the content-addressed store, hash-verified

200 raise SqlmapSystemException(errMsg)
201
202 def _checkcache(self, index):
203 if self.cache is not None and not isinstance(self.cache, Cache):
204 self.cache = None
205
206 if (self.cache and self.cache.index != index and self.cache.dirty):
207 filename = self._dump(self.cache.data)
208 self.chunks[self.cache.index] = filename
209
210 if not (self.cache and self.cache.index == index):
211 try:
212 with open(self.chunks[index], "rb") as f:
213 self.cache = Cache(index, pickle.loads(zlib.decompress(f.read())), False)
214 except Exception as ex:
215 errMsg = "exception occurred while retrieving data "
216 errMsg += "from a temporary file ('%s')" % ex
217 raise SqlmapSystemException(errMsg)
218
219 def __getstate__(self):
220 if self.cache and self.cache.dirty:

Callers 2

__getitem__Method · 0.95
__setitem__Method · 0.95

Calls 4

_dumpMethod · 0.95
CacheClass · 0.85
readMethod · 0.45

Tested by

no test coverage detected