1
0
mirror of https://github.com/projectatomic/atomic.git synced 2026-02-07 06:44:52 +01:00

Return the same message when we fail to connect to the docker daemon

Docker client returns

"Cannot connect to the Docker daemon. Is the docker daemon running on this host?"

atomic info should also trigger this error.
This commit is contained in:
Dan Walsh
2015-11-11 15:39:48 -05:00
parent 09ac4796ba
commit a05248b009

View File

@@ -331,8 +331,8 @@ class Atomic(object):
except docker.errors.APIError:
pass
except requests.exceptions.ConnectionError as e:
raise IOError("Unable to communicate with docker daemon: %s\n" %
str(e))
raise IOError("Cannot connect to the Docker daemon. Is the docker daemon running on this host?")
return None
def _inspect_container(self, name=None):
@@ -648,7 +648,7 @@ class Atomic(object):
inspection = None
if not self.args.force_remote_info:
try:
inspection = self.d.inspect_image(self.args.image)
inspection = self._inspect_image(self.args.image)
except docker.errors.APIError:
# No such image locally, but fall back to remote
pass