Skip to content

Commit

Permalink
Merge pull request #2 from VorTECHsa/directory-race
Browse files Browse the repository at this point in the history
Allow preexisting directories in the cache path
  • Loading branch information
maxhipperson committed Feb 5, 2024
2 parents f1121b8 + a6a257b commit dece7d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion uhura/caches.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def update(self, obj):
logger.info(f"Dumping to {self._path}")

if not os.path.exists(os.path.dirname(self._path)):
os.makedirs(os.path.dirname(self._path))
os.makedirs(os.path.dirname(self._path), exist_ok=True)
self._serde.write_to_file(self._path, obj)
return obj

Expand Down

0 comments on commit dece7d0

Please sign in to comment.