fix
This commit is contained in:
@@ -193,16 +193,17 @@ def handle_strava_sync(stravatoken,workoutid,filename,name,activity_type,descrip
|
||||
with open(filename,'rb') as f:
|
||||
try:
|
||||
act = client.upload_activity(f,'tcx.gz',name=name)
|
||||
try:
|
||||
res = act.wait(poll_interval=5.0, timeout=60)
|
||||
except stravalib.exc.ActivityUploadFailed:
|
||||
failed = True
|
||||
except JSONDecodeError:
|
||||
failed = True
|
||||
except stravalib.exc.ObjectNotFound:
|
||||
failed = True
|
||||
except ActivityUploadFailed:
|
||||
failed = True
|
||||
try:
|
||||
res = act.wait(poll_interval=5.0, timeout=60)
|
||||
except ActivityUploadFailed:
|
||||
failed = True
|
||||
except JSONDecodeError:
|
||||
failed = True
|
||||
except stravalib.exc.ObjectNotFound:
|
||||
failed = True
|
||||
|
||||
if not failed:
|
||||
try:
|
||||
act = client.update_activity(res.id,activity_type=activity_type,
|
||||
|
||||
Reference in New Issue
Block a user