From 2953893222b5a5840dd46b6695a62f2e88ebda33 Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Wed, 8 Apr 2020 03:28:59 +0200 Subject: [PATCH] yeee --- variable_grabbler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/variable_grabbler.py b/variable_grabbler.py index 2d36cfa..43a9670 100644 --- a/variable_grabbler.py +++ b/variable_grabbler.py @@ -70,7 +70,7 @@ for variable in config_values: print variable.upper(), print "was not found in the file. Skipping command execution." else: - replacement = repr(config_values[variable]) + replacement = str(config_values[variable]) print repr(replacement) # look for variable sections that contain question marks argument_positions = [] @@ -79,7 +79,7 @@ for variable in config_values: if replacement[i] == '?' and (i==0 or not replacement[i-1]=='\\'): argument_positions = argument_positions + [ i ] i = i+1 - print "DEBUG: " + repr(argument_positions) + print "DEBUG: " + str(argument_positions) replacement = replacement.replace("\\?", "?") file_out = open(sys.argv[1], "w") file_out.write(file_content.decode('utf-8').replace("%" + variable.upper() + "%", replacement).encode('utf-8'))