mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
docker.version_info is now provided.
This commit is contained in:
parent
36f05fb526
commit
d8cca2a009
1 changed files with 1 additions and 12 deletions
|
@ -525,18 +525,7 @@ def _get_docker_py_versioninfo():
|
|||
'''
|
||||
Returns a version_info tuple for docker-py
|
||||
'''
|
||||
contextkey = 'docker.docker_py_version'
|
||||
if contextkey in __context__:
|
||||
return __context__[contextkey]
|
||||
match = re.match(VERSION_RE, str(docker.__version__))
|
||||
if match:
|
||||
__context__[contextkey] = tuple(
|
||||
[int(x) for x in match.group(1).split('.')]
|
||||
)
|
||||
else:
|
||||
log.warning('Unable to determine docker-py version')
|
||||
__context__[contextkey] = None
|
||||
return __context__[contextkey]
|
||||
return docker.version_info
|
||||
|
||||
|
||||
# Decorators
|
||||
|
|
Loading…
Add table
Reference in a new issue