2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-26 19:40:12 +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 adb4ce919e
commit 0b85fab529

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)