Skip to content

Commit

Permalink
Merge pull request #2357 from RossHammer/readonly-filesystem-fix
Browse files Browse the repository at this point in the history
Fixing issue with reaonly filesystems
  • Loading branch information
ADBond authored Sep 2, 2024
2 parents be5131b + bbfd2a3 commit 21d316c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion splink/internals/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ class _SplinkDataSetsMeta(type):
cache_dir = _cache_dir

def __new__(cls, clsname, bases, attrs, datasets):
cls.cache_dir.mkdir(exist_ok=True)
attributes = {}
repr_text = "splink_datasets object with datasets:"
for dataset_meta in datasets:
Expand Down Expand Up @@ -185,6 +184,7 @@ def class_attribute_factory(
cls, dataset_name, url, rows, unique_entities, description, data_format
):
def lazyload_data(self):
cls.cache_dir.mkdir(exist_ok=True)
file_loc = cls.cache_dir / f"{dataset_name}.{data_format}"
if not cls.datafile_exists(file_loc):
print(f"downloading: {url}") # noqa: T201
Expand Down

0 comments on commit 21d316c

Please sign in to comment.