From 2a37d64dc99cfe755d354f9981239e868ece473a Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 10 Oct 2019 17:03:57 -0400 Subject: [PATCH] Fix XCC discovery in python3 Python3 was picky about the strings, normalize key areas to strings. --- confluent_server/confluent/discovery/handlers/xcc.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/confluent_server/confluent/discovery/handlers/xcc.py b/confluent_server/confluent/discovery/handlers/xcc.py index b7c269cd..fcc3255f 100644 --- a/confluent_server/confluent/discovery/handlers/xcc.py +++ b/confluent_server/confluent/discovery/handlers/xcc.py @@ -127,8 +127,8 @@ class NodeHandler(immhandler.NodeHandler): raise return (None, None) pwdchanged = False - adata = json.dumps({'username': username, - 'password': password + adata = json.dumps({'username': util.stringify(username), + 'password': util.stringify(password) }) headers = {'Connection': 'keep-alive', 'Content-Type': 'application/json'} @@ -291,6 +291,8 @@ class NodeHandler(immhandler.NodeHandler): userinfo = wc.grab_json_response('/api/dataset/imm_users') curruser = None uid = None + user = util.stringify(user) + passwd = util.stringify(passwd) for userent in userinfo['items'][0]['users']: if userent['users_user_name'] == user: curruser = userent