forked from root/threadr.lostcave.ddnss.de
yeee
parent
c22d2bea65
commit
2953893222
|
@ -70,7 +70,7 @@ for variable in config_values:
|
||||||
print variable.upper(),
|
print variable.upper(),
|
||||||
print "was not found in the file. Skipping command execution."
|
print "was not found in the file. Skipping command execution."
|
||||||
else:
|
else:
|
||||||
replacement = repr(config_values[variable])
|
replacement = str(config_values[variable])
|
||||||
print repr(replacement)
|
print repr(replacement)
|
||||||
# look for variable sections that contain question marks
|
# look for variable sections that contain question marks
|
||||||
argument_positions = []
|
argument_positions = []
|
||||||
|
@ -79,7 +79,7 @@ for variable in config_values:
|
||||||
if replacement[i] == '?' and (i==0 or not replacement[i-1]=='\\'):
|
if replacement[i] == '?' and (i==0 or not replacement[i-1]=='\\'):
|
||||||
argument_positions = argument_positions + [ i ]
|
argument_positions = argument_positions + [ i ]
|
||||||
i = i+1
|
i = i+1
|
||||||
print "DEBUG: " + repr(argument_positions)
|
print "DEBUG: " + str(argument_positions)
|
||||||
replacement = replacement.replace("\\?", "?")
|
replacement = replacement.replace("\\?", "?")
|
||||||
file_out = open(sys.argv[1], "w")
|
file_out = open(sys.argv[1], "w")
|
||||||
file_out.write(file_content.decode('utf-8').replace("%" + variable.upper() + "%", replacement).encode('utf-8'))
|
file_out.write(file_content.decode('utf-8').replace("%" + variable.upper() + "%", replacement).encode('utf-8'))
|
||||||
|
|
Loading…
Reference in New Issue