mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Merge pull request #41011 from terminalmage/docker-refresh-credentials
Use proposed docker-py reload_config() function
This commit is contained in:
commit
b00acb0034
@ -818,8 +818,14 @@ def _client_wrapper(attr, *args, **kwargs):
|
||||
'''
|
||||
catch_api_errors = kwargs.pop('catch_api_errors', True)
|
||||
func = getattr(__context__['docker.client'], attr, None)
|
||||
if func is None:
|
||||
if func is None or not hasattr(func, '__call__'):
|
||||
raise SaltInvocationError('Invalid client action \'{0}\''.format(attr))
|
||||
if attr in ('push', 'pull'):
|
||||
try:
|
||||
# Refresh auth config from config.json
|
||||
__context__['docker.client'].reload_config()
|
||||
except AttributeError:
|
||||
pass
|
||||
err = ''
|
||||
try:
|
||||
log.debug(
|
||||
|
Loading…
Reference in New Issue
Block a user