From d464ebbdc4fb30544d5ed1d4cc0da0c9e4a64b9e Mon Sep 17 00:00:00 2001 From: Jessica Smith <12jessicasmith34@gmail.com> Date: Fri, 10 Jan 2025 09:16:35 -0600 Subject: [PATCH] fix regression, ensure cache path is created if not exists --- src/otf_api/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/otf_api/utils.py b/src/otf_api/utils.py index a40e4a2..999d6bf 100644 --- a/src/otf_api/utils.py +++ b/src/otf_api/utils.py @@ -14,6 +14,9 @@ class CacheableData: name: str cache_dir: Path + def __attrs_post_init__(self): + self.cache_dir.mkdir(parents=True, exist_ok=True) + @property def cache_path(self) -> Path: """The path to the cache file."""