From ced228427e70bef964064117e2186016bf128c22 Mon Sep 17 00:00:00 2001 From: Adam Coldrick Date: Sat, 17 Feb 2018 13:20:55 +0000 Subject: [PATCH] Fix login when using python 3 Change-Id: I0185461daafc904fd5ad180cef0233ea75903b67 Story: 2000576 Task: 2978 --- storyboard/api/auth/openid_client.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/storyboard/api/auth/openid_client.py b/storyboard/api/auth/openid_client.py index 61bcfa44..a3366c34 100644 --- a/storyboard/api/auth/openid_client.py +++ b/storyboard/api/auth/openid_client.py @@ -133,7 +133,11 @@ class OpenIdClient(object): verify_response = requests.post(CONF.oauth.openid_url, data=verify_params) - verify_data_tokens = verify_response.content.split() + content = verify_response.content + if isinstance(content, bytes): + content = content.decode('utf-8') + verify_data_tokens = content.split() + verify_dict = dict((token.split(":")[0], token.split(":")[1]) for token in verify_data_tokens)