From f7fe38f498721c438fda70e3ca354a7e68fd07a5 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 24 Oct 2019 10:29:58 -0400 Subject: [PATCH] Fix problem with reassign and TSM --- confluent_server/confluent/discovery/handlers/tsm.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/confluent_server/confluent/discovery/handlers/tsm.py b/confluent_server/confluent/discovery/handlers/tsm.py index 6870d141..0fba1b05 100644 --- a/confluent_server/confluent/discovery/handlers/tsm.py +++ b/confluent_server/confluent/discovery/handlers/tsm.py @@ -109,10 +109,10 @@ class NodeHandler(generic.NodeHandler): authdata['password'] = self.currpass if authmode != 1: rsp, status = wc.grab_json_response_with_status('/api/session', authdata) - if authmode == 1 or rsp.status == 403: + if authmode == 1 or status == 403: wc.set_header('Content-Type', 'application/x-www-form-urlencoded') rsp, status = wc.grab_json_response_with_status('/api/session', urlencode(authdata)) - if rsp.status != 200: + if status != 200: return None self.csrftok = rsp['CSRFToken'] self.channel = rsp['channel'] @@ -121,7 +121,7 @@ class NodeHandler(generic.NodeHandler): authdata['password'] = self.targpass if authmode != 1: rsp, status = wc.grab_json_response_with_status('/api/session', authdata) - if authmode == 1 or rsp.status == 403: + if authmode == 1 or status == 403: wc.set_header('Content-Type', 'application/x-www-form-urlencoded') rsp, status = wc.grab_json_response_with_status('/api/session', urlencode(authdata)) if status != 200: