fix
This commit is contained in:
@@ -1599,14 +1599,18 @@ def get_workouttype_from_fit(filename,workouttype='water'):
|
|||||||
import rowingdata.tcxtools as tcxtools
|
import rowingdata.tcxtools as tcxtools
|
||||||
|
|
||||||
def get_workouttype_from_tcx(filename,workouttype='water'):
|
def get_workouttype_from_tcx(filename,workouttype='water'):
|
||||||
d = tcxtools.tcx_getdict(filename)
|
|
||||||
tcxtype = 'rowing'
|
tcxtype = 'rowing'
|
||||||
try:
|
try:
|
||||||
tcxtype = d['Activities']['Activity']['@Sport'].lower()
|
d = tcxtools.tcx_getdict(filename)
|
||||||
if tcxtype == 'other':
|
try:
|
||||||
tcxtype = 'rowing'
|
tcxtype = d['Activities']['Activity']['@Sport'].lower()
|
||||||
except KeyError:
|
if tcxtype == 'other':
|
||||||
return workouttype
|
tcxtype = 'rowing'
|
||||||
|
except KeyError:
|
||||||
|
return workouttype
|
||||||
|
|
||||||
|
except TypeError:
|
||||||
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
workouttype = mytypes.garminmappinginv[tcxtype.upper()]
|
workouttype = mytypes.garminmappinginv[tcxtype.upper()]
|
||||||
|
|||||||
Reference in New Issue
Block a user