Skip to content

Commit d19cc94

Browse files
committed
fix archive download of plain optimade.jsonl
1 parent 44f6130 commit d19cc94

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/optimade_maker/archive/archive_record.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,9 @@ def download_files(self, path=None):
162162
download_file(file_url, path, rename="optimade.yaml")
163163

164164
# download files in record
165-
if hasattr(self.mc_config.entries, "jsonl_path"):
165+
if getattr(self.mc_config.entries, "jsonl_path", None):
166166
# case 1: jsonl file specified (either via `file: jsonl.gz` or `jsonl_path:`)
167-
if hasattr(self.mc_config.entries, "file"):
167+
if getattr(self.mc_config.entries, "file", None):
168168
# download `file:`, if specified
169169
file_url = self.get_file_url(self.mc_config.entries.file)
170170
download_file(file_url, path)
@@ -176,7 +176,7 @@ def download_files(self, path=None):
176176
# case 2: files specified as entry_paths/property_paths
177177
for entry in self.mc_config.entries:
178178
list_of_files = [path.file for path in entry.entry_paths]
179-
if hasattr(entry, "property_paths"):
179+
if getattr(entry, "property_paths", None):
180180
list_of_files += [path.file for path in entry.property_paths]
181181
for fname in list_of_files:
182182
file_url = self.get_file_url(fname)

0 commit comments

Comments
 (0)