2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-06-18 09:30:50 +00:00

Have client exit on auth issue

Without this, an auth error will leave client just
hanging without any feedback.  Correct this with
raising an exception for now.
This commit is contained in:
Jarrod Johnson
2016-01-28 10:26:28 -05:00
parent 0b51edde97
commit a2445e7f65
+2
View File
@@ -208,6 +208,8 @@ def send_request(operation, path, server, parameters=None):
:param server: The socket to send data over
:param parameters: Parameters if any to send along with the request
"""
if not self.authenticated:
raise Exception('Unauthenticated')
payload = {'operation': operation, 'path': path}
if parameters is not None:
payload['parameters'] = parameters