summaryrefslogtreecommitdiffstats
path: root/ipalib/base.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2015-08-10 18:29:33 +0200
committerJan Cholasta <jcholast@redhat.com>2015-09-01 11:42:01 +0200
commitdd16cc98b0d67f1448bf9de25f8adce512b1431c (patch)
treee9fa6c41da6894b16a366b02d61c29b15c5a9b4a /ipalib/base.py
parent404177f7a322ced4e05cfc6b2ed330b6fcce0c04 (diff)
downloadfreeipa-dd16cc98b0d67f1448bf9de25f8adce512b1431c.tar.gz
freeipa-dd16cc98b0d67f1448bf9de25f8adce512b1431c.tar.xz
freeipa-dd16cc98b0d67f1448bf9de25f8adce512b1431c.zip
Use six.string_types instead of "basestring"
Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipalib/base.py')
-rw-r--r--ipalib/base.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ipalib/base.py b/ipalib/base.py
index 12b2efd00..33b33eeb2 100644
--- a/ipalib/base.py
+++ b/ipalib/base.py
@@ -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]