Private
Public Access
1
0

extra check in fit files

This commit is contained in:
Sander Roosendaal
2020-10-01 16:32:07 +02:00
parent 0364f94dd5
commit 5b107f3ca9
3 changed files with 48 additions and 22 deletions

View File

@@ -1596,7 +1596,10 @@ def get_workouttype_from_fit(filename,workouttype='water'):
fittype = 'rowing'
for record in records:
if record.name in ['sport','lap']:
fittype = record.get_values()['sport'].lower()
try:
fittype = record.get_values()['sport'].lower()
except KeyError:
return 'water'
try:
workouttype = mytypes.fitmappinginv[fittype]
except KeyError: