summaryrefslogtreecommitdiffstats
path: root/ipalib/aci.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/aci.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/aci.py')
-rwxr-xr-xipalib/aci.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ipalib/aci.py b/ipalib/aci.py
index f78c5327d..3019375c1 100755
--- a/ipalib/aci.py
+++ b/ipalib/aci.py
@@ -20,6 +20,8 @@
import shlex
import re
+import six
+
# The Python re module doesn't do nested parenthesis
# Break the ACI into 3 pieces: target, name, permissions/bind_rules
@@ -159,7 +161,7 @@ class ACI:
raise SyntaxError, "invalid permission: '%s'" % p
if not self.name:
raise SyntaxError, "name must be set"
- if not isinstance(self.name, basestring):
+ if not isinstance(self.name, six.string_types):
raise SyntaxError, "name must be a string"
if not isinstance(self.target, dict) or len(self.target) == 0:
raise SyntaxError, "target must be a non-empty dictionary"