replaced async with non keyword equivalent
This commit is contained in:
@@ -859,7 +859,7 @@ def default(o):
|
||||
raise TypeError
|
||||
|
||||
# Uploading workout
|
||||
def workout_c2_upload(user,w,async=False):
|
||||
def workout_c2_upload(user,w,asynchron=False):
|
||||
message = 'trying C2 upload'
|
||||
try:
|
||||
if mytypes.c2mapping[w.workouttype] is None:
|
||||
@@ -888,7 +888,7 @@ def workout_c2_upload(user,w,async=False):
|
||||
'Content-Type': 'application/json'}
|
||||
import urllib
|
||||
url = "https://log.concept2.com/api/users/%s/results" % (c2userid)
|
||||
if not async:
|
||||
if not asynchron:
|
||||
response = requests.post(url,headers=headers,data=json.dumps(data,default=default))
|
||||
|
||||
|
||||
|
||||
@@ -525,7 +525,7 @@ def do_sync(w,options, quick=False):
|
||||
|
||||
if ('upload_to_C2' in options and options['upload_to_C2']) or (w.user.c2_auto_export and ispromember(w.user.user)):
|
||||
try:
|
||||
message,id = c2stuff.workout_c2_upload(w.user.user,w,async=True)
|
||||
message,id = c2stuff.workout_c2_upload(w.user.user,w,asynchron=True)
|
||||
except NoTokenError:
|
||||
id = 0
|
||||
message = "Something went wrong with the Concept2 sync"
|
||||
|
||||
Reference in New Issue
Block a user