From a21da7472eabf200966135201c392902b3cbe118 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Thu, 4 Jun 2020 20:55:31 +0200 Subject: [PATCH] removing try / except TP --- rowers/tpstuff.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/rowers/tpstuff.py b/rowers/tpstuff.py index fc74ac9e..86cd1340 100644 --- a/rowers/tpstuff.py +++ b/rowers/tpstuff.py @@ -67,14 +67,11 @@ def get_token(code): 'Content-Type': 'application/x-www-form-urlencoded', } - try: - response = requests.post( - "https://oauth.trainingpeaks.com/oauth/token", - data=post_data - ) - except: - return 0,0,0 - + response = requests.post( + "https://oauth.trainingpeaks.com/oauth/token", + data=post_data + ) + try: token_json = response.json()