mirror of https://github.com/docker/docker-py.git
Don't allow 'version' param in AutoVersionClient ctor
This commit is contained in:
parent
2ec104792b
commit
bd46ba5757
|
|
@ -963,5 +963,9 @@ class Client(requests.Session):
|
||||||
|
|
||||||
class AutoVersionClient(Client):
|
class AutoVersionClient(Client):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
if 'version' in kwargs and kwargs['version']:
|
||||||
|
raise errors.DockerException(
|
||||||
|
'Can not specify version for AutoVersionClient'
|
||||||
|
)
|
||||||
kwargs['version'] = 'auto'
|
kwargs['version'] = 'auto'
|
||||||
super(AutoVersionClient, self).__init__(*args, **kwargs)
|
super(AutoVersionClient, self).__init__(*args, **kwargs)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue