MCPcopy
hub / github.com/omkarcloud/botasaurus / _get

Function _get

botasaurus/cache.py:61–67  ·  view source on GitHub ↗
(cache_path)

Source from the content-addressed store, hash-verified

59 return os.path.exists(cache_path)
60
61def _get(cache_path):
62 try:
63 return read_json(cache_path)
64 except (JSONDecodeError, FileNotFoundError):
65 # These are files which are corrupted, likely as user paused when files were being written.
66 _remove(cache_path)
67 raise CacheMissException(cache_path)
68
69def safe_get(cache_path):
70 try:

Callers 3

getMethod · 0.70
getMethod · 0.70
get_item_by_hashMethod · 0.70

Calls 3

read_jsonFunction · 0.70
_removeFunction · 0.70
CacheMissExceptionClass · 0.70

Tested by

no test coverage detected