File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ def get_model_file_list(
126
126
:returns: value of lems_def_dir so that the temporary directory can be
127
127
cleaned up. strings are immuatable in Python so the variable cannot be
128
128
modified in the function.
129
- :raises ValueError: if a file that does not have ".xml" or ".nml " as extension is encountered
129
+ :raises ValueError: if a file that does not have ".xml", ".nml", or ".h5 " as extension is encountered
130
130
"""
131
131
logger .debug (f"Processing { rootfile } " )
132
132
@@ -148,7 +148,7 @@ def get_model_file_list(
148
148
logger .debug (f"Appending: { relrootfile } " )
149
149
filelist .append (relrootfile )
150
150
151
- if rootfile .endswith (".nml" ):
151
+ if rootfile .endswith (".nml" ) or rootfile . endswith ( ".h5" ) :
152
152
if pathlib .Path (rootfile ).is_absolute ():
153
153
rootdoc = read_neuroml2_file (rootfile )
154
154
else :
@@ -183,7 +183,9 @@ def get_model_file_list(
183
183
lems_def_dir = get_model_file_list (inc , filelist , rootdir , lems_def_dir )
184
184
185
185
else :
186
- raise ValueError (f"File must have a .xml or .nml extension. We got: { rootfile } " )
186
+ raise ValueError (
187
+ f"File must have a .xml, .nml, or .h5 extension. We got: { rootfile } "
188
+ )
187
189
188
190
return lems_def_dir
189
191
You can’t perform that action at this time.
0 commit comments