mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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:
committed by
Jan Cholasta
parent
404177f7a3
commit
dd16cc98b0
@@ -23,6 +23,8 @@ Foundational classes and functions.
|
||||
|
||||
import re
|
||||
|
||||
import six
|
||||
|
||||
from ipalib.constants import NAME_REGEX, NAME_ERROR
|
||||
from ipalib.constants import TYPE_ERROR, SET_ERROR, DEL_ERROR, OVERRIDE_ERROR
|
||||
|
||||
@@ -466,7 +468,7 @@ class NameSpace(ReadOnly):
|
||||
:param key: The name or index of a member, or a slice object.
|
||||
"""
|
||||
key = getattr(key, '__name__', key)
|
||||
if isinstance(key, basestring):
|
||||
if isinstance(key, six.string_types):
|
||||
return self.__map[key]
|
||||
if type(key) in (int, slice):
|
||||
return self.__members[key]
|
||||
|
||||
Reference in New Issue
Block a user