summaryrefslogtreecommitdiff
path: root/swiftclient/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'swiftclient/client.py')
-rw-r--r--swiftclient/client.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/swiftclient/client.py b/swiftclient/client.py
index 01dbaa1..2766461 100644
--- a/swiftclient/client.py
+++ b/swiftclient/client.py
@@ -97,8 +97,11 @@ def http_log(args, kwargs, resp, body):
def quote(value, safe='/'):
"""
- Patched version of urllib.quote that encodes utf8 strings before quoting
+ Patched version of urllib.quote that encodes utf8 strings before quoting.
+ On Python 3, call directly urllib.parse.quote().
"""
+ if six.PY3:
+ return _quote(value, safe=safe)
value = encode_utf8(value)
if isinstance(value, bytes):
return _quote(value, safe)