From 3bcb24e6569a446c489f6058239db42adbf73a24 Mon Sep 17 00:00:00 2001 From: Olaf Kilian Date: Thu, 7 May 2015 09:36:32 +0200 Subject: [PATCH] Added more meaningful fail messages on Docker API --- cloud/docker/docker_login.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cloud/docker/docker_login.py b/cloud/docker/docker_login.py index b515b414c5a..1292fe38909 100644 --- a/cloud/docker/docker_login.py +++ b/cloud/docker/docker_login.py @@ -153,6 +153,8 @@ class DockerLoginManager: reauth=self.reauth, dockercfg_path=self.dockercfg_path ) + except DockerAPIError as e: + self.module.fail_json(msg="Docker API Error: %s" % e.explanation) except Exception as e: self.module.fail_json(msg="failed to login to the remote registry", error=repr(e))