summaryrefslogtreecommitdiff
path: root/htmlcache.py
diff options
context:
space:
mode:
Diffstat (limited to 'htmlcache.py')
-rw-r--r--htmlcache.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/htmlcache.py b/htmlcache.py
index 8264468..2dc29b4 100644
--- a/htmlcache.py
+++ b/htmlcache.py
@@ -14,6 +14,10 @@ class HtmlCache:
def __init__(self, cache_path: str):
self._cache_path = os.path.abspath(cache_path)
+ try:
+ os.mkdir(self._cache_path)
+ except FileExistsError:
+ pass
async def get_utaten_tex_source(self, item_id: str) -> main.LyricInfo:
cache_file_path = os.path.join(self._cache_path, f'{item_id}.html')