Skip to content

Commit bd46ba5

Browse files
committed
Don't allow 'version' param in AutoVersionClient ctor
1 parent 2ec1047 commit bd46ba5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docker/client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -963,5 +963,9 @@ def wait(self, container, timeout=None):
963963

964964
class AutoVersionClient(Client):
965965
def __init__(self, *args, **kwargs):
966+
if 'version' in kwargs and kwargs['version']:
967+
raise errors.DockerException(
968+
'Can not specify version for AutoVersionClient'
969+
)
966970
kwargs['version'] = 'auto'
967971
super(AutoVersionClient, self).__init__(*args, **kwargs)

0 commit comments

Comments
 (0)