MCPcopy Index your code
hub / github.com/webpy/webpy / __getitem__

Method __getitem__

web/session.py:273–281  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

271 return os.path.exists(path)
272
273 def __getitem__(self, key):
274 path = self._get_path(key)
275
276 if os.path.exists(path):
277 with open(path, "rb") as fh:
278 pickled = fh.read()
279 return self.decode(pickled)
280 else:
281 raise KeyError(key)
282
283 def __setitem__(self, key, value):
284 path = self._get_path(key)

Callers

nothing calls this directly

Calls 2

_get_pathMethod · 0.95
decodeMethod · 0.80

Tested by

no test coverage detected