summaryrefslogtreecommitdiff
path: root/docker/client.py
diff options
context:
space:
mode:
authorTomas Tomecek <ttomecek@redhat.com>2016-07-27 10:26:16 +0200
committerJoffrey F <joffrey@docker.com>2016-08-17 12:20:13 -0700
commit3062ae4348ab916a9afd574cb70891b9131aff11 (patch)
tree4d941a1a8964e9066879ed006494ba43d75cb39a /docker/client.py
parent95d9306d2a1fd22dffb12a0548abf2d2f744ed9d (diff)
downloaddocker-py-3062ae4348ab916a9afd574cb70891b9131aff11.tar.gz
docker client consistency: don't quote ':/'
E.g. docker client `/v1.21/images/localhost:5000/busybox/push?tag=` docker-py `/v1.21/images/localhost%3A5000%2Fbusybox/push` Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
Diffstat (limited to 'docker/client.py')
-rw-r--r--docker/client.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/docker/client.py b/docker/client.py
index 1b5420e..9f75ce7 100644
--- a/docker/client.py
+++ b/docker/client.py
@@ -14,6 +14,7 @@
import json
import struct
+from functools import partial
import requests
import requests.exceptions
@@ -157,7 +158,8 @@ class Client(
'instead'.format(arg, type(arg))
)
- args = map(six.moves.urllib.parse.quote_plus, args)
+ quote_f = partial(six.moves.urllib.parse.quote_plus, safe="/:")
+ args = map(quote_f, args)
if kwargs.get('versioned_api', True):
return '{0}/v{1}{2}'.format(