Skip to contentSkip to conversation

bastille: convert to py3

PATCH New akuster 1 participant 1 message Feb 7, 2020

lore
Share & tools
lore

akuster

author
#0 lore raw

PATCH 1/1 bastille: convert to py3

---
 recipes-security/bastille/files/set_required_questions.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-security/bastille/files/set_required_questions.py +2 -2
index 4a28358..f306109 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #Signed-off-by: Anne Mulhern <[email protected]>
 
@@ -83,7 +83,7 @@ def xform_file(qfile, distro, qlabel):
   @param name qlabel The question label for which the distro is to be added.
   """
   questions_in = open(qfile)
-  questions_out = tempfile.NamedTemporaryFile(delete=False)
+  questions_out = tempfile.NamedTemporaryFile(mode="w+", delete=False)
   for l in add_requires(qlabel, distro, questions_in):
     questions_out.write(l)
   questions_out.close()
Signature · 1 line
2.17.1