summaryrefslogtreecommitdiff
path: root/src/saml2/pack.py
diff options
context:
space:
mode:
authorClint Byrum <clint@fewbar.com>2015-05-15 11:44:03 -0700
committerClint Byrum <clint@fewbar.com>2015-05-15 11:52:15 -0700
commitea94fb4e795245d1801d2d2b1faf6f94009e09cf (patch)
treeebd7b4d8f773c6c6df74ed511ceb7db1109791bc /src/saml2/pack.py
parent45f88c16268ccf8a6c106b1ea20e84515c74e476 (diff)
downloadpysaml2-ea94fb4e795245d1801d2d2b1faf6f94009e09cf.tar.gz
Deal with renamed modules in python3
six.moves handles some of the reorganized modules. With dircache, it was simply removed as it has been deprecated for a long time. os.listdir performs fine these days.
Diffstat (limited to 'src/saml2/pack.py')
-rw-r--r--src/saml2/pack.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/saml2/pack.py b/src/saml2/pack.py
index e73dc309..8057ad03 100644
--- a/src/saml2/pack.py
+++ b/src/saml2/pack.py
@@ -10,7 +10,7 @@ Bindings normally consists of three parts:
- how to package the information
- which protocol to use
"""
-import urlparse
+from six.moves.urllib.parse import urlparse
import saml2
import base64
import urllib
@@ -129,7 +129,7 @@ def http_redirect_message(message, location, relay_state="", typ="SAMLRequest",
else:
string = urllib.urlencode(args)
- glue_char = "&" if urlparse.urlparse(location).query else "?"
+ glue_char = "&" if urlparse(location).query else "?"
login_url = glue_char.join([location, string])
headers = [('Location', str(login_url))]
body = []