From 7d836ccf25cd716d070fe2fa4ab24dd0ae9d81b3 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Sat, 16 Aug 2025 16:28:35 -0700 Subject: [PATCH] Less brittle --- molbloom/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/molbloom/__init__.py b/molbloom/__init__.py index 4b38e92..f04fd23 100644 --- a/molbloom/__init__.py +++ b/molbloom/__init__.py @@ -39,8 +39,7 @@ def _download_progress(count, block_size, total_size): def _load_big_filter(name): # check if it's present filter_path = os.path.join(_DEFAULT_PATH, f"{name}.bloom") - if not os.path.exists(_DEFAULT_PATH): - os.makedirs(_DEFAULT_PATH) + os.makedirs(_DEFAULT_PATH, exist_ok=True) if not os.path.exists(filter_path): print(f"Starting {name} download to cache directory {_DEFAULT_PATH}") import urllib.request