MCPcopy Index your code
hub / github.com/aws/aws-cli / __getitem__

Method __getitem__

awscli/botocore/utils.py:3956–3963  ·  view source on GitHub ↗

Retrieve value from a cache key.

(self, cache_key)

Source from the content-addressed store, hash-verified

3954 return os.path.isfile(actual_key)
3955
3956 def __getitem__(self, cache_key):
3957 """Retrieve value from a cache key."""
3958 actual_key = self._convert_cache_key(cache_key)
3959 try:
3960 with open(actual_key) as f:
3961 return json.load(f)
3962 except (OSError, ValueError):
3963 raise KeyError(cache_key)
3964
3965 def __delitem__(self, cache_key):
3966 actual_key = self._convert_cache_key(cache_key)

Callers

nothing calls this directly

Calls 2

_convert_cache_keyMethod · 0.95
loadMethod · 0.45

Tested by

no test coverage detected