summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-08-16 14:54:40 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-17 08:41:19 +0000
commitcd73f77414586fed66c5d7d81d57448ff1f0b54e (patch)
treea672253beec63fc21fd9ff2a45d5f9b9a854b01d /contrib
parent50afe5b031a6b63f9eca3937a2dd104bf23d4828 (diff)
downloadpodman-cd73f77414586fed66c5d7d81d57448ff1f0b54e.tar.gz
podman-cd73f77414586fed66c5d7d81d57448ff1f0b54e.tar.bz2
podman-cd73f77414586fed66c5d7d81d57448ff1f0b54e.zip
Fix handling of socket connection refusal.
Currently if the socket was never started you get an error about the service being started. But if the service was started and later stopped, you get a useless error. This change causes the error to always be the same for connection refused. The error message was also repeating the address twice which looked bad. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #1287 Approved by: baude
Diffstat (limited to 'contrib')
-rw-r--r--contrib/python/podman/podman/client.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/python/podman/podman/client.py b/contrib/python/podman/podman/client.py
index 327bfdee2..b61506cda 100644
--- a/contrib/python/podman/podman/client.py
+++ b/contrib/python/podman/podman/client.py
@@ -175,12 +175,12 @@ class Client():
if not System(self._client).ping():
raise ConnectionRefusedError(
errno.ECONNREFUSED,
- 'Failed varlink connection "{}"'.format(address), address)
+ ('Failed varlink connection "{}"').format(address))
except FileNotFoundError:
raise ConnectionError(
errno.ECONNREFUSED,
('Failed varlink connection "{}".'
- ' Is podman service running?').format(address), address)
+ ' Is podman socket or service running?').format(address))
def __enter__(self):
"""Return `self` upon entering the runtime context."""