From bd46ba57578a74ebc9245a5dbd0741fa2af7f527 Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Thu, 5 Mar 2015 12:08:16 -0800 Subject: [PATCH] Don't allow 'version' param in AutoVersionClient ctor --- docker/client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/client.py b/docker/client.py index 7142a607..79726aaf 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)