We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7d97b8e commit d971b02Copy full SHA for d971b02
pydelmod/schismstudy.py
@@ -133,6 +133,11 @@ def __init__(
133
self.base_dir, pathlib.Path(output_dir)
134
)
135
try:
136
+ # check permissions to create cache in base_dir
137
+ test_cache_path = self.base_dir / ".cache-schismstudy"
138
+ test_cache_path.mkdir(parents=True, exist_ok=True)
139
+ if not os.access(test_cache_path, os.W_OK):
140
+ raise PermissionError("No write access to cache directory.")
141
self.cache = diskcache.Cache(self.base_dir / ".cache-schismstudy")
142
except:
143
logger.warning("Could not create cache. Using temporary cache.")
0 commit comments