Use six.string_types instead of "basestring"

Reviewed-By: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
Petr Viktorin
2015-08-10 18:29:33 +02:00
committed by Jan Cholasta
parent 404177f7a3
commit dd16cc98b0
22 changed files with 114 additions and 71 deletions

View File

@@ -36,6 +36,7 @@ import ldap.filter
from ldap.ldapobject import SimpleLDAPObject
from ldap.controls import SimplePagedResultsControl
import ldapurl
import six
from ipalib import errors, _
from ipalib.constants import LDAP_GENERALIZED_TIME_FORMAT
@@ -330,7 +331,7 @@ class LDAPEntry(collections.MutableMapping):
self._not_list.discard(name)
def _attr_name(self, name):
if not isinstance(name, basestring):
if not isinstance(name, six.string_types):
raise TypeError(
"attribute name must be unicode or str, got %s object %r" % (
name.__class__.__name__, name))