From 7960c4d0f3ed71c8344d50360fb3c5840ef10385 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Tue, 24 Mar 2020 20:51:39 +0100 Subject: [PATCH] bug fix --- rowers/c2stuff.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rowers/c2stuff.py b/rowers/c2stuff.py index 4fcbd5e9..41393b94 100644 --- a/rowers/c2stuff.py +++ b/rowers/c2stuff.py @@ -624,7 +624,11 @@ def do_refresh_token(refreshtoken): response = s.send(prepped) - token_json = response.json() + try: + token_json = response.json() + except JSONDecodeError: + return [None,None,None] + try: thetoken = token_json['access_token'] expires_in = token_json['expires_in']