summaryrefslogtreecommitdiffstats
path: root/ipapython
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2017-01-10 13:45:11 +0100
committerMartin Basti <mbasti@redhat.com>2017-01-24 13:25:47 +0100
commite0641092770530e3b93c00de415172751d031210 (patch)
treee3479c5fdabf440cce1cd5dd86a7412b8a64c4d5 /ipapython
parent23239bccc18f2fdc10431134a1c6a777f450704e (diff)
downloadfreeipa-e0641092770530e3b93c00de415172751d031210.tar.gz
freeipa-e0641092770530e3b93c00de415172751d031210.tar.xz
freeipa-e0641092770530e3b93c00de415172751d031210.zip
py3: service.py: replace mkstemp by NamedTemporaryFile
NamedTemporaryfile can be used in more pythonic way and file can be opened in textual mode that is required with PY3 https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipapython')
-rw-r--r--ipapython/ipautil.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipapython/ipautil.py b/ipapython/ipautil.py
index e3e4611b8..34d10ef78 100644
--- a/ipapython/ipautil.py
+++ b/ipapython/ipautil.py
@@ -852,7 +852,7 @@ def ipa_generate_password(entropy_bits=256, uppercase=1, lowercase=1, digits=1,
rnd = random.SystemRandom()
todo_entropy = entropy_bits
- password = ''
+ password = u''
# Generate required character classes:
# The order of generated characters is fixed to comply with check in
# NSS function sftk_newPinCheck() in nss/lib/softoken/fipstokn.c.