mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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>
This commit is contained in:
parent
200614872e
commit
4b104c742b
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user