2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-13 19:27:51 +00:00

Fix XCC discovery in python3

Python3 was picky about the strings, normalize key areas
to strings.
This commit is contained in:
Jarrod Johnson 2019-10-10 17:03:57 -04:00
parent 8101672c3a
commit 2a37d64dc9

View File

@ -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