diff options
author | Petr Viktorin <pviktori@redhat.com> | 2016-01-26 15:05:14 +0100 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2016-02-17 10:41:29 +0100 |
commit | 4b104c742b6fcf68671e4f81968973680858950f (patch) | |
tree | 184f1cbb8fb5909930290220080a5e440148e14e | |
parent | 200614872e664db38aa7610b2aad818882aaa2a8 (diff) | |
download | freeipa-4b104c742b6fcf68671e4f81968973680858950f.tar.gz freeipa-4b104c742b6fcf68671e4f81968973680858950f.tar.xz freeipa-4b104c742b6fcf68671e4f81968973680858950f.zip |
ipautil: Use mode 'w+' in write_tmp_file
Python defaults to 'w+b', but all callers in IPA write use text (as
opposed to bytes).
https://fedorahosted.org/freeipa/ticket/5638
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
-rw-r--r-- | ipapython/ipautil.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ipapython/ipautil.py b/ipapython/ipautil.py index 91a0eb215..6d07e07a0 100644 --- a/ipapython/ipautil.py +++ b/ipapython/ipautil.py @@ -251,7 +251,7 @@ def copy_template_file(infilename, outfilename, vars): def write_tmp_file(txt): - fd = tempfile.NamedTemporaryFile() + fd = tempfile.NamedTemporaryFile('w+') fd.write(txt) fd.flush() |