Skip to content
Snippets Groups Projects
Commit 46f68e2e authored by Christoph Stahl's avatar Christoph Stahl
Browse files

create cache directory, if not exists

parent fb05b44b
No related branches found
No related tags found
No related merge requests found
......@@ -94,6 +94,8 @@ class S3Source(FileBasedSource):
if obj.object_name is not None and self.has_correct_extension(obj.object_name)
]
if self.index_file is not None and not os.path.isfile(self.index_file):
os.makedirs(os.path.dirname(self.index_file), exist_ok=True)
with open(self.index_file, "w", encoding="utf8") as index_file_handle:
dump(file_list, index_file_handle)
return file_list
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment