Private
Public Access
1
0

Merge branch 'release/v18.0.15'

This commit is contained in:
Sander Roosendaal
2023-03-26 12:42:04 +02:00
3 changed files with 4 additions and 4 deletions

View File

@@ -207,7 +207,7 @@ class StravaIntegration(SyncIntegration):
def get_workout(self, id, *args, **kwargs) -> int:
try:
_ = self.open()
except NoTokenError:
except NoTokenError("Strava error"):
return 0
csvfilename = 'media/{code}_{id}.csv'.format(
@@ -229,9 +229,9 @@ class StravaIntegration(SyncIntegration):
limit_n = kwargs.get('limit_n',0)
if (self.rower.stravatoken == '') or (self.rower.stravatoken is None): # pragma: no cover
raise NoTokenError
raise NoTokenError("Error")
elif (self.rower.stravatokenexpirydate is None or timezone.now()+timedelta(seconds=3599) > self.rower.stravatokenexpirydate): # pragma: no cover
raise NoTokenError
raise NoTokenError("Error")
# ready to fetch. Hurray
authorizationstring = str('Bearer ' + self.rower.stravatoken)

View File

@@ -121,7 +121,7 @@ class TPIntegration(SyncIntegration):
)
if response.status_code != 200:
raise NoTokenError
raise NoTokenError("no token")
try:
token_json = response.json()

Binary file not shown.