@@ -392,19 +392,19 @@ def run_modules(self):
392392 if module_status ['completion_time' ] is not None :
393393 continue
394394
395- module_output_json = self ._get_module_output_json_filename (module )
396- command = ( sys .executable
397- + " -W ignore -m ecephys_spike_sorting.modules." + module
398- + " --input_json " + module_input_json
399- + " --output_json " + module_output_json )
395+ module_output_json = self ._get_module_output_json_filename (module )
396+ command = [ sys .executable ,
397+ '-W' , ' ignore' , '-m' , ' ecephys_spike_sorting.modules.' + module ,
398+ ' --input_json' , module_input_json . replace ( ' ' , '\ ' ),
399+ ' --output_json' , module_output_json . replace ( ' ' , '\ ' )]
400400
401401 start_time = datetime .utcnow ()
402402 self ._update_module_status (
403403 {module : {'start_time' : start_time ,
404404 'completion_time' : None ,
405405 'duration' : None }})
406406 with open (module_logfile , "a" ) as f :
407- subprocess .check_call (command . split ( ' ' ) , stdout = f )
407+ subprocess .check_call (command , stdout = f )
408408 completion_time = datetime .utcnow ()
409409 self ._update_module_status (
410410 {module : {'start_time' : start_time ,
0 commit comments