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/server.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/server.py')
-rw-r--r-- | src/saml2/server.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/saml2/server.py b/src/saml2/server.py index ce703cd4..58017b1b 100644 --- a/src/saml2/server.py +++ b/src/saml2/server.py @@ -10,6 +10,7 @@ import os import importlib import shelve +import six import threading from saml2 import saml @@ -89,7 +90,7 @@ class Server(Entity): _spec = self.config.getattr("session_storage", "idp") if not _spec: return SessionStorage() - elif isinstance(_spec, basestring): + elif isinstance(_spec, six.string_types): if _spec.lower() == "memory": return SessionStorage() else: # Should be tuple @@ -116,7 +117,7 @@ class Server(Entity): typ = "" if not dbspec: idb = {} - elif isinstance(dbspec, basestring): + elif isinstance(dbspec, six.string_types): idb = shelve.open(dbspec, writeback=True) else: # database spec is a a 2-tuple (type, address) #print(>> sys.stderr, "DBSPEC: %s" % (dbspec,)) |