diff options
| author | Petr Viktorin <pviktori@redhat.com> | 2015-10-20 18:14:14 +0200 |
|---|---|---|
| committer | Tomas Babej <tbabej@redhat.com> | 2015-10-27 17:23:25 +0100 |
| commit | acf519f5c5e02578efe6e9c3e1816654e0f23e95 (patch) | |
| tree | d6b2e78311d45148a3652ded8a208cdd47ca1082 /ipatests | |
| parent | 6811b4be6ae462526a1c6bec222e939045879ba1 (diff) | |
| download | freeipa-acf519f5c5e02578efe6e9c3e1816654e0f23e95.tar.gz freeipa-acf519f5c5e02578efe6e9c3e1816654e0f23e95.tar.xz freeipa-acf519f5c5e02578efe6e9c3e1816654e0f23e95.zip | |
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>
Diffstat (limited to 'ipatests')
| -rw-r--r-- | ipatests/test_ipapython/test_secrets.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ipatests/test_ipapython/test_secrets.py b/ipatests/test_ipapython/test_secrets.py index d88659e6f..9fbf825d2 100644 --- a/ipatests/test_ipapython/test_secrets.py +++ b/ipatests/test_ipapython/test_secrets.py @@ -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]) |
