diff options
author | Petr Viktorin <pviktori@redhat.com> | 2016-01-05 13:54:43 +0100 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2016-01-20 11:59:21 +0100 |
commit | b2436560dfb4f2d45d3bf4bdfe1b2a05ff98ee38 (patch) | |
tree | 4c643c0a04f5fa51965a0ed56d67f70ad1a20062 /ipaserver | |
parent | 462f4a5161185e74432cfe492ab959cc15b12711 (diff) | |
download | freeipa-b2436560dfb4f2d45d3bf4bdfe1b2a05ff98ee38.tar.gz freeipa-b2436560dfb4f2d45d3bf4bdfe1b2a05ff98ee38.tar.xz freeipa-b2436560dfb4f2d45d3bf4bdfe1b2a05ff98ee38.zip |
Alias "unicode" to "str" under Python 3
Follow-up to commit 23507e6124041ed17f39db211e802495e37520e7
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.
https://fedorahosted.org/freeipa/ticket/5623
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'ipaserver')
-rw-r--r-- | ipaserver/install/server/common.py | 5 | ||||
-rw-r--r-- | ipaserver/install/server/replicainstall.py | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/ipaserver/install/server/common.py b/ipaserver/install/server/common.py index c2d69064d..bd1035172 100644 --- a/ipaserver/install/server/common.py +++ b/ipaserver/install/server/common.py @@ -7,6 +7,8 @@ from __future__ import print_function import os import sys +import six + from ipapython.dn import DN from ipapython.install import common, core from ipapython.install.core import Knob @@ -14,6 +16,9 @@ from ipalib.util import validate_domain_name from ipaserver.install import bindinstance from ipapython.ipautil import check_zone_overlap +if six.PY3: + unicode = str + VALID_SUBJECT_ATTRS = ['st', 'o', 'ou', 'dnqualifier', 'c', 'serialnumber', 'l', 'title', 'sn', 'givenname', 'initials', 'generationqualifier', 'dc', 'mail', diff --git a/ipaserver/install/server/replicainstall.py b/ipaserver/install/server/replicainstall.py index 7edee88e1..41d14f580 100644 --- a/ipaserver/install/server/replicainstall.py +++ b/ipaserver/install/server/replicainstall.py @@ -15,6 +15,8 @@ import socket import sys import tempfile +import six + from ipapython import ipaldap, ipautil, sysrestore from ipapython.dn import DN from ipapython.install.common import step @@ -40,6 +42,9 @@ from binascii import hexlify from .common import BaseServer +if six.PY3: + unicode = str + DIRMAN_DN = DN(('cn', 'directory manager')) |