diff options
| author | Christian Heimes <cheimes@redhat.com> | 2018-09-26 12:46:45 +0200 |
|---|---|---|
| committer | Christian Heimes <cheimes@redhat.com> | 2018-09-27 16:11:18 +0200 |
| commit | ed967ec24dee2cd8b4204e117f7f41fac5b845a7 (patch) | |
| tree | d6e4e0d7b79d25be6a63ebe6a8239308d2b299a9 /ipapython | |
| parent | 61156b0a50dc4eddff46a1352574e04d298e9af9 (diff) | |
| download | freeipa-ed967ec24dee2cd8b4204e117f7f41fac5b845a7.tar.gz freeipa-ed967ec24dee2cd8b4204e117f7f41fac5b845a7.tar.xz freeipa-ed967ec24dee2cd8b4204e117f7f41fac5b845a7.zip | |
Py3: Replace six.bytes_type with bytes
See: https://pagure.io/freeipa/issue/7715
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
Diffstat (limited to 'ipapython')
| -rw-r--r-- | ipapython/ipautil.py | 4 | ||||
| -rw-r--r-- | ipapython/kerberos.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ipapython/ipautil.py b/ipapython/ipautil.py index 2f4209cff..f83465e25 100644 --- a/ipapython/ipautil.py +++ b/ipapython/ipautil.py @@ -1439,13 +1439,13 @@ if six.PY2: Decode argument using the file system encoding, as returned by `sys.getfilesystemencoding()`. """ - if isinstance(value, six.binary_type): + if isinstance(value, bytes): return value.decode(sys.getfilesystemencoding()) elif isinstance(value, str): return value else: raise TypeError("expect {0} or {1}, not {2}".format( - six.binary_type.__name__, + bytes.__name__, str.__name__, type(value).__name__)) else: diff --git a/ipapython/kerberos.py b/ipapython/kerberos.py index a031fcc0c..5dfd36bbb 100644 --- a/ipapython/kerberos.py +++ b/ipapython/kerberos.py @@ -66,7 +66,7 @@ class Principal: Container for the principal name and realm according to RFC 1510 """ def __init__(self, components, realm=None): - if isinstance(components, six.binary_type): + if isinstance(components, bytes): raise TypeError( "Cannot create a principal object from bytes: {!r}".format( components) |
