diff options
author | Paul Tax <paultax@gmail.com> | 2015-08-24 21:30:28 +0200 |
---|---|---|
committer | Paul Tax <paultax@gmail.com> | 2015-08-24 21:30:28 +0200 |
commit | d7efa498106b7f2d8ea97368e237c30f1df781d3 (patch) | |
tree | 1ddb714800797cdab8feb1a6315840e6eda278e9 | |
parent | 5ef2d19b629a12ea73d04bb263bf9dc1c9b4b8b9 (diff) | |
download | python-requests-aws-d7efa498106b7f2d8ea97368e237c30f1df781d3.tar.gz |
Py3 imports
-rw-r--r-- | awsauth.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -6,11 +6,11 @@ import urllib py3k = False try: - from urlparse import urlparse + from urlparse import urlparse, unquote from base64 import encodestring except: py3k = True - from urllib.parse import urlparse + from urllib.parse import urlparse, unquote from base64 import encodebytes as encodestring from email.utils import formatdate @@ -146,6 +146,6 @@ class S3Auth(AuthBase): # if we sign the request with the encoded value the signature will # not be valid, we'll get 403 Access Denied. # So we unquote, this is no-op if the value isn't encoded. - buf += '{key}={value}'.format(key=k, value=urlparse.unquote(v)) + buf += '{key}={value}'.format(key=k, value=unquote(v)) return buf |