Skip to content

Commit

Permalink
Merge pull request #41 from dimitris-flyr/patch-1
Browse files Browse the repository at this point in the history
Use `exist_ok=False` for os.makedirs
  • Loading branch information
tsroten authored Feb 22, 2024
2 parents e9dc76f + 97f555d commit 659e412
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/fcache/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ def create(self):
"""Create the write buffer and cache directory."""
if not self._sync and not hasattr(self, "_buffer"):
self._buffer = {}
if not os.path.exists(self.cache_dir):
os.makedirs(self.cache_dir)
os.makedirs(self.cache_dir, exist_ok=True)

def clear(self):
"""Remove all items from the write buffer and cache.
Expand Down

0 comments on commit 659e412

Please sign in to comment.