Skip to content

Commit e560304

Browse files
committed
fixed bug with ast not being able to parse the input/output files
1 parent 8b41dff commit e560304

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

wfcommons/wfbench/bench.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,17 +232,17 @@ def _rename_files_to_wfbench_format(self) -> List[File]:
232232
for key in list(output_files_dict.keys()):
233233
if file.file_id == key:
234234
output_files_dict[new_name] = output_files_dict.pop(key)
235-
output_files_dict = json.dumps(output_files_dict).replace('"', '\\"')
236-
task.args[i] = f"{flag} '{output_files_dict}'"
235+
output_files_dict = json.dumps(output_files_dict)
236+
task.args[i] = f"{flag} {output_files_dict}"
237237

238238
if item.startswith("--input-files"):
239239
flag, input_files_arr = item.split(" ", 1)
240240
input_files_arr = [f"{file}" for file in ast.literal_eval(input_files_arr)]
241241
for j, input_file in enumerate(input_files_arr):
242242
if file.file_id == input_file:
243243
input_files_arr[j] = new_name
244-
input_files_arr = json.dumps(input_files_arr).replace('"', '\\"')
245-
task.args[i] = f"{flag} '{input_files_arr}'"
244+
input_files_arr = json.dumps(input_files_arr)
245+
task.args[i] = f"{flag} {input_files_arr}"
246246

247247
file.file_id = new_name
248248

0 commit comments

Comments
 (0)