@@ -162,9 +162,9 @@ def download_files(self, path=None):
162
162
download_file (file_url , path , rename = "optimade.yaml" )
163
163
164
164
# download files in record
165
- if hasattr (self .mc_config .entries , "jsonl_path" ):
165
+ if getattr (self .mc_config .entries , "jsonl_path" , None ):
166
166
# 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 ):
168
168
# download `file:`, if specified
169
169
file_url = self .get_file_url (self .mc_config .entries .file )
170
170
download_file (file_url , path )
@@ -176,7 +176,7 @@ def download_files(self, path=None):
176
176
# case 2: files specified as entry_paths/property_paths
177
177
for entry in self .mc_config .entries :
178
178
list_of_files = [path .file for path in entry .entry_paths ]
179
- if hasattr (entry , "property_paths" ):
179
+ if getattr (entry , "property_paths" , None ):
180
180
list_of_files += [path .file for path in entry .property_paths ]
181
181
for fname in list_of_files :
182
182
file_url = self .get_file_url (fname )
0 commit comments