diff options
author | Clint Byrum <clint@fewbar.com> | 2015-05-15 11:40:37 -0700 |
---|---|---|
committer | Clint Byrum <clint@fewbar.com> | 2015-05-15 11:52:15 -0700 |
commit | 45f88c16268ccf8a6c106b1ea20e84515c74e476 (patch) | |
tree | 3adf708b1898965a5963cb9e5ced6ce2447c6977 /src/saml2/saml.py | |
parent | 2b86176aafbf93c3492476069a19ee3841d562aa (diff) | |
download | pysaml2-45f88c16268ccf8a6c106b1ea20e84515c74e476.tar.gz |
Use six.string_types instead of basestring
In python3 strings are different, so basestring isn't available
anymore. While examining these uses, all of them still work fine with
six.string_types and should not need any new special handling to deal
with bytes.
Diffstat (limited to 'src/saml2/saml.py')
-rw-r--r-- | src/saml2/saml.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/saml2/saml.py b/src/saml2/saml.py index 07f3c3e7..d1513835 100644 --- a/src/saml2/saml.py +++ b/src/saml2/saml.py @@ -11,6 +11,7 @@ from saml2.validate import valid_domain_name import saml2 from saml2 import SamlBase +import six from saml2 import xmldsig as ds from saml2 import xmlenc as xenc @@ -192,7 +193,7 @@ class AttributeValueBase(SamlBase): val = base64.encodestring(val) self.set_type("xs:base64Binary") else: - if isinstance(val, basestring): + if isinstance(val, six.string_types): if not typ: self.set_type("xs:string") else: |