diff options
| author | Armin Kuster <akuster808@gmail.com> | 2020-02-02 21:11:38 +0000 |
|---|---|---|
| committer | Armin Kuster <akuster808@gmail.com> | 2020-02-10 19:13:52 -0800 |
| commit | 2df5bbcf1742fedc84f0de5122a044df8774992f (patch) | |
| tree | fed80fb5bd37bee61895558b33379e88635c1d0a | |
| parent | ace43479e725e524a7c2b168adcd5dcddd512868 (diff) | |
| download | meta-security-2df5bbcf1742fedc84f0de5122a044df8774992f.tar.gz | |
bastille: convert to py3
Signed-off-by: Armin Kuster <akuster808@gmail.com>
| -rwxr-xr-x | recipes-security/bastille/files/set_required_questions.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/recipes-security/bastille/files/set_required_questions.py b/recipes-security/bastille/files/set_required_questions.py index 4a28358..f306109 100755 --- a/recipes-security/bastille/files/set_required_questions.py +++ b/recipes-security/bastille/files/set_required_questions.py | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python3 |
| 2 | 2 | ||
| 3 | #Signed-off-by: Anne Mulhern <mulhern@yoctoproject.org> | 3 | #Signed-off-by: Anne Mulhern <mulhern@yoctoproject.org> |
| 4 | 4 | ||
| @@ -83,7 +83,7 @@ def xform_file(qfile, distro, qlabel): | |||
| 83 | @param name qlabel The question label for which the distro is to be added. | 83 | @param name qlabel The question label for which the distro is to be added. |
| 84 | """ | 84 | """ |
| 85 | questions_in = open(qfile) | 85 | questions_in = open(qfile) |
| 86 | questions_out = tempfile.NamedTemporaryFile(delete=False) | 86 | questions_out = tempfile.NamedTemporaryFile(mode="w+", delete=False) |
| 87 | for l in add_requires(qlabel, distro, questions_in): | 87 | for l in add_requires(qlabel, distro, questions_in): |
| 88 | questions_out.write(l) | 88 | questions_out.write(l) |
| 89 | questions_out.close() | 89 | questions_out.close() |
