The file must be writeable...
This commit is contained in:
parent
df6cf284e4
commit
cf4d866f0c
|
@ -48,7 +48,7 @@ def run_configfile_module():
|
|||
changed = False
|
||||
|
||||
with open(path, 'r') as input:
|
||||
with tempfile.NamedTemporaryFile(dir=os.path.dirname(path), mode="r") as temp:
|
||||
with tempfile.NamedTemporaryFile(dir=os.path.dirname(path), mode="rw") as temp:
|
||||
for line in input:
|
||||
print(expand(line), end=' ', file=temp)
|
||||
|
||||
|
|
Loading…
Reference in New Issue