mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipapython.secrets: Port to Python 3
StringIO was renamed in Python 3. The import was was unused, so remove it. Files need to be opened in binary mode if bytes are written to them. (For Python 2: on Linux, there's no practical difference between text and binary mode) Reviewed-By: Tomas Babej <tbabej@redhat.com>
This commit is contained in:
parent
6811b4be6a
commit
acf519f5c5
@ -11,7 +11,6 @@ import ldap
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
import StringIO
|
||||
import tempfile
|
||||
|
||||
|
||||
|
@ -31,7 +31,7 @@ class TestiSecStore(unittest.TestCase):
|
||||
cls.cert2db = os.path.join(testdir, 'cert2db')
|
||||
os.mkdir(cls.cert2db)
|
||||
seedfile = os.path.join(testdir, 'seedfile')
|
||||
with open(seedfile, 'w') as f:
|
||||
with open(seedfile, 'wb') as f:
|
||||
seed = os.urandom(1024)
|
||||
f.write(seed)
|
||||
subprocess.call(['certutil', '-d', cls.certdb, '-N', '-f', pwfile])
|
||||
|
Loading…
Reference in New Issue
Block a user