Skip to content

Commit

Permalink
Issue #2273
Browse files Browse the repository at this point in the history
Fix race condition
  • Loading branch information
mfisherlevine authored Feb 1, 2022
1 parent cda88ef commit 215f99c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions astroquery/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ def __init__(self):
self.cache_location = os.path.join(
paths.get_cache_dir(), 'astroquery',
self.__class__.__name__.split("Class")[0])
if not os.path.exists(self.cache_location):
os.makedirs(self.cache_location)
os.makedirs(self.cache_location, exist_ok=True)
self._cache_active = True

def __call__(self, *args, **kwargs):
Expand Down

0 comments on commit 215f99c

Please sign in to comment.