Skip to content

Commit

Permalink
Mitigate concurrency flaw when creating directories
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Apr 25, 2021
1 parent c2fb28e commit e70ca89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wetterdienst/util/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
]
for cache_directory in cache_directories:
if not os.path.exists(cache_directory):
os.makedirs(cache_directory)
os.makedirs(cache_directory, exist_ok=True)

# Configure cache backend.
# TODO: Make cache backend configurable, e.g. optionally use Redis for running
Expand Down

0 comments on commit e70ca89

Please sign in to comment.