Skip to content

Commit b4a96c1

Browse files
committed
Bugfix yield_task_args method handling of string arg values
Strings must be treated as raw strings to avoid unintentional interpretation of special characters in text.
1 parent 887ab46 commit b4a96c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ def yield_task_args(task_list, script_args,
730730
if int(argval) == argval:
731731
argval = int(argval)
732732
except ValueError:
733-
argval = '"{}"'.format(argval)
733+
argval = 'r"{}"'.format(argval)
734734

735735
exec_statement = 'task_args.{} = {}'.format(argname, argval)
736736
# print(exec_statement)
@@ -951,4 +951,4 @@ def write_input_command_txt(arg_str, dst_dir):
951951
with open(txt_fp, 'w') as f:
952952
f.write(arg_str)
953953
except:
954-
logger.error("Could not write command reference text file")
954+
logger.error("Could not write command reference text file")

0 commit comments

Comments
 (0)