2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-12-24 12:11:52 +00:00

Replace the network error with a local error

This is a bit more clear about the cause when local commands fail.
This commit is contained in:
Jarrod Johnson 2019-03-28 11:03:33 -04:00
parent 9379c85d0e
commit 907d25164f

View File

@ -136,6 +136,8 @@ class Command(object):
self.serverloc = server
if os.path.isabs(self.serverloc) and os.path.exists(self.serverloc):
self._connect_unix()
elif self.serverloc == '/var/run/confluent/api.sock':
raise Exception('Confluent service is not available')
else:
self._connect_tls()
tlvdata.recv(self.connection)