From 5126068a19354dd1fab139aaa2449d51106e9631 Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Thu, 15 Nov 2018 18:43:39 +0530 Subject: [PATCH] Missing min version in string format (#48715) Signed-off-by: Abhijeet Kasurde --- lib/ansible/modules/cloud/docker/docker_prune.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/cloud/docker/docker_prune.py b/lib/ansible/modules/cloud/docker/docker_prune.py index ceaff75e0f..6076098dea 100644 --- a/lib/ansible/modules/cloud/docker/docker_prune.py +++ b/lib/ansible/modules/cloud/docker/docker_prune.py @@ -219,9 +219,10 @@ def main(): ) # Version checks - if client.module.params['builder_cache'] and LooseVersion(docker_version) < LooseVersion('3.3.0'): + cache_min_version = '3.3.0' + if client.module.params['builder_cache'] and LooseVersion(docker_version) < LooseVersion(cache_min_version): msg = "Error: docker version is %s. Minimum version required for builds option is %s. Use `pip install --upgrade docker` to upgrade." - client.module.fail(msg=(msg % (docker_version, ))) + client.module.fail(msg=(msg % (docker_version, cache_min_version))) result = dict()