mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Try the docker-py 2.0 client name first
This should give us a modest perfomance improvement as more people begin to use docker-py>=2.0.
This commit is contained in:
parent
dff35b58f8
commit
da42040c1a
1 changed files with 2 additions and 2 deletions
|
@ -787,10 +787,10 @@ def _get_client(timeout=None):
|
|||
client_kwargs['version'] = 'auto'
|
||||
|
||||
try:
|
||||
__context__['docker.client'] = docker.Client(**client_kwargs)
|
||||
except AttributeError:
|
||||
# docker-py 2.0 renamed this client attribute
|
||||
__context__['docker.client'] = docker.APIClient(**client_kwargs)
|
||||
except AttributeError:
|
||||
__context__['docker.client'] = docker.Client(**client_kwargs)
|
||||
|
||||
# Set a new timeout if one was passed
|
||||
if timeout is not None and __context__['docker.client'].timeout != timeout:
|
||||
|
|
Loading…
Add table
Reference in a new issue