Merge pull request #1 from ProfessorManhattan/ProfessorManhattan-patch-1

Update qubesformation.py
This commit is contained in:
Brian Zalewski 2022-09-18 23:32:37 -04:00 committed by GitHub
commit ce843d49f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,7 +99,7 @@ class ActionModule(template):
qubesdata = commonlib.inject_qubes(task_vars)
task_vars["vms"] = generate_datastructure(qubesdata, task_vars)
with tempfile.NamedTemporaryFile() as x:
x.write(contents)
x.write(contents.encode())
x.flush()
self._task.args['src'] = x.name
retval = template.run(self, tmp, task_vars)
@ -107,7 +107,7 @@ class ActionModule(template):
return retval
with tempfile.NamedTemporaryFile() as y:
y.write(topcontents)
y.write(topcontents.encode())
y.flush()
# Create new tmp path -- the other was blown away.