summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2022-01-18 16:09:32 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2022-01-18 16:09:32 +0100
commit04619e4c28d5c6b919d841b57d8341ddcbbbfceb (patch)
tree0a99267f31c3c2374cda1a8fe46cf6cdb2891983 /lib
parentb619697df57ffa51e7caa44ecd4566a2f6dcf49c (diff)
loader: gracefully handle uncreatable cache directory
Diffstat (limited to 'lib')
-rw-r--r--lib/loader/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/loader/__init__.py b/lib/loader/__init__.py
index 8f730bb..8b671ef 100644
--- a/lib/loader/__init__.py
+++ b/lib/loader/__init__.py
@@ -415,6 +415,12 @@ class RawData:
os.mkdir(self.cache_dir)
except FileExistsError:
pass
+ except PermissionError:
+ logger.info(
+ f"Cannot write cache entry {self.cache_file}: permission denied"
+ )
+ # no cache for you
+ return
with open(self.cache_file, "w") as f:
cache_data = {
"filenames": self.filenames,