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:
|
with open(filename,'rb') as f:
|
||||||
try:
|
try:
|
||||||
act = client.upload_activity(f,'tcx.gz',name=name)
|
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:
|
except ActivityUploadFailed:
|
||||||
failed = True
|
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:
|
if not failed:
|
||||||
try:
|
try:
|
||||||
act = client.update_activity(res.id,activity_type=activity_type,
|
act = client.update_activity(res.id,activity_type=activity_type,
|
||||||
|
|||||||
Reference in New Issue
Block a user