summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Tax <paultax@gmail.com>2015-08-24 21:30:28 +0200
committerPaul Tax <paultax@gmail.com>2015-08-24 21:30:28 +0200
commitd7efa498106b7f2d8ea97368e237c30f1df781d3 (patch)
tree1ddb714800797cdab8feb1a6315840e6eda278e9
parent5ef2d19b629a12ea73d04bb263bf9dc1c9b4b8b9 (diff)
downloadpython-requests-aws-d7efa498106b7f2d8ea97368e237c30f1df781d3.tar.gz
Py3 imports
-rw-r--r--awsauth.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/awsauth.py b/awsauth.py
index b444f01..221e70c 100644
--- a/awsauth.py
+++ b/awsauth.py
@@ -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