diff options
author | Jan Cholasta <jcholast@redhat.com> | 2015-09-11 13:43:28 +0200 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2015-09-17 11:08:43 +0200 |
commit | 23507e6124041ed17f39db211e802495e37520e7 (patch) | |
tree | 8cf010848183a977fde0d5cdcd653556d215cd62 /install | |
parent | 1550b5ab50966387bac19f46b34a2107010d08d4 (diff) | |
download | freeipa-23507e6124041ed17f39db211e802495e37520e7.tar.gz freeipa-23507e6124041ed17f39db211e802495e37520e7.tar.xz freeipa-23507e6124041ed17f39db211e802495e37520e7.zip |
Alias "unicode" to "str" under Python 3
The six way of doing this is to replace all occurences of "unicode"
with "six.text_type". However, "unicode" is non-ambiguous and
(arguably) easier to read. Also, using it makes the patches smaller,
which should help with backporting.
Reviewed-By: Petr Viktorin <pviktori@redhat.com>
Diffstat (limited to 'install')
-rwxr-xr-x | install/certmonger/dogtag-ipa-ca-renew-agent-submit | 6 | ||||
-rwxr-xr-x | install/oddjob/com.redhat.idm.trust-fetch-domains | 5 | ||||
-rwxr-xr-x | install/tools/ipa-adtrust-install | 4 |
3 files changed, 15 insertions, 0 deletions
diff --git a/install/certmonger/dogtag-ipa-ca-renew-agent-submit b/install/certmonger/dogtag-ipa-ca-renew-agent-submit index 9f65b0515..44993b038 100755 --- a/install/certmonger/dogtag-ipa-ca-renew-agent-submit +++ b/install/certmonger/dogtag-ipa-ca-renew-agent-submit @@ -35,6 +35,8 @@ import base64 import contextlib import json +import six + from ipapython import ipautil from ipapython.dn import DN from ipalib import api, errors, pkcs10, x509 @@ -56,6 +58,10 @@ UNCONFIGURED = 4 WAIT_WITH_DELAY = 5 OPERATION_NOT_SUPPORTED_BY_HELPER = 6 +if six.PY3: + unicode = str + + @contextlib.contextmanager def ldap_connect(): conn = None diff --git a/install/oddjob/com.redhat.idm.trust-fetch-domains b/install/oddjob/com.redhat.idm.trust-fetch-domains index 138779c0c..019545b93 100755 --- a/install/oddjob/com.redhat.idm.trust-fetch-domains +++ b/install/oddjob/com.redhat.idm.trust-fetch-domains @@ -10,8 +10,13 @@ from ipalib.constants import DEFAULT_CONFIG from ipapython.ipautil import kinit_keytab import sys import os, pwd + +import six import gssapi +if six.PY3: + unicode = str + def retrieve_keytab(api, ccache_name, oneway_keytab_name, oneway_principal): getkeytab_args = ["/usr/sbin/ipa-getkeytab", "-s", api.env.host, diff --git a/install/tools/ipa-adtrust-install b/install/tools/ipa-adtrust-install index 9ff1ac9be..5bece0d8b 100755 --- a/install/tools/ipa-adtrust-install +++ b/install/tools/ipa-adtrust-install @@ -23,6 +23,7 @@ from __future__ import print_function +import six import gssapi from ipaserver.install import adtrustinstance @@ -36,6 +37,9 @@ from ipaplatform.paths import paths from ipapython.ipa_log_manager import * from ipapython.dn import DN +if six.PY3: + unicode = str + log_file_name = paths.IPASERVER_INSTALL_LOG def parse_options(): |