File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -161,20 +161,11 @@ def _get_settings(self):
161161 NIWORKFLOWS_LOG .info ("User-defined settings, overriding defaults" )
162162 return self .inputs .settings
163163
164- # Define a prefix for output files based on the modality of the moving image.
165- filestart = "{}-mni_registration_{}_" .format (
166- self .inputs .moving .lower (), self .inputs .flavor
167- )
168-
169164 data_dir = load_data ()
170165 # Get a list of settings files that match the flavor.
171- filenames = [
172- path .name
173- for path in data_dir .iterdir ()
174- if path .name .startswith (filestart ) and path .name .endswith (".json" )
175- ]
176- # Return the settings files.
177- return [str (data_dir / f ) for f in sorted (filenames )]
166+ return sorted ([str (path ) for path in data_dir .glob (
167+ f"{ self .inputs .moving .lower ()} -mni_registration_{ self .inputs .flavor } _*.json"
168+ )])
178169
179170 def _run_interface (self , runtime ):
180171 # Get a list of settings files.
You can’t perform that action at this time.
0 commit comments