summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoffrey F <joffrey@docker.com>2015-03-05 12:08:16 -0800
committerJoffrey F <joffrey@docker.com>2015-03-05 12:08:16 -0800
commitbd46ba57578a74ebc9245a5dbd0741fa2af7f527 (patch)
treed9a08b446a435e9189c4512ee77598bbcf53db4b
parent2ec104792b367b8c0f2b1f92182b848f844c223e (diff)
downloaddocker-py-bd46ba57578a74ebc9245a5dbd0741fa2af7f527.tar.gz
Don't allow 'version' param in AutoVersionClient ctor
-rw-r--r--docker/client.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/docker/client.py b/docker/client.py
index 7142a60..79726aa 100644
--- a/docker/client.py
+++ b/docker/client.py
@@ -963,5 +963,9 @@ class Client(requests.Session):
class AutoVersionClient(Client):
def __init__(self, *args, **kwargs):
+ if 'version' in kwargs and kwargs['version']:
+ raise errors.DockerException(
+ 'Can not specify version for AutoVersionClient'
+ )
kwargs['version'] = 'auto'
super(AutoVersionClient, self).__init__(*args, **kwargs)