Private
Public Access
1
0

fixed unicode response

This commit is contained in:
Sander Roosendaal
2018-05-11 09:35:47 +02:00
parent 34135c7e9b
commit 9969fb8d29
2 changed files with 12 additions and 0 deletions

View File

@@ -102,6 +102,11 @@ def do_refresh_token(refreshtoken):
refresh_token = token_json['refresh_token']
except KeyError:
refresh_token = refreshtoken
try:
expires_in = int(expires_in)
except (TypeError,ValueError):
expires_in = 0
return [thetoken,expires_in,refresh_token]
@@ -131,6 +136,10 @@ def get_token(code):
refresh_token = token_json['refresh_token']
except KeyError:
refresh_token = refreshtoken
try:
expires_in = int(expires_in)
except (ValueError,TypeError):
expires_in = 0
else:
return [0,0,0]