mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Py3: Replace six.integer_types with int
In Python 3, six.integer_types is (int,). In most places, the alias can be simply replaced with int. In other places, it was possible to simplify the code by unpacking the tuple. See: https://pagure.io/freeipa/issue/7715 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
This commit is contained in:
@@ -909,8 +909,7 @@ class LDAPClient:
|
||||
return b'TRUE'
|
||||
else:
|
||||
return b'FALSE'
|
||||
elif isinstance(val, (unicode, six.integer_types, Decimal, DN,
|
||||
Principal)):
|
||||
elif isinstance(val, (unicode, int, Decimal, DN, Principal)):
|
||||
return six.text_type(val).encode('utf-8')
|
||||
elif isinstance(val, DNSName):
|
||||
return val.to_text().encode('ascii')
|
||||
|
Reference in New Issue
Block a user