From afe3d132b5e0904341cc60591b4e8d599de13c1f Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Sun, 26 Feb 2017 20:08:16 +0100 Subject: [PATCH] v1.29 --- rowers/c2stuff.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rowers/c2stuff.py b/rowers/c2stuff.py index 5bc7afa7..46cff86f 100644 --- a/rowers/c2stuff.py +++ b/rowers/c2stuff.py @@ -363,8 +363,11 @@ def get_token(code): token_json = response.json() try: - status_code = token_json['status_code'] - except KeyError: + status_code = response.status_code + # status_code = token_json['status_code'] + except AttributeError: + # except KeyError: + return (0,response.text) try: status_code = token_json.status_code except AttributeError: