Private
Public Access
1
0

bug fix mail handling

This commit is contained in:
Sander Roosendaal
2017-10-14 09:52:37 +02:00
parent de7751befa
commit 4745505056

View File

@@ -190,13 +190,19 @@ def handle_sendemail_unrecognized(unrecognizedfile,useremail):
'Rowsandall <info@rowsandall.com>',
[fullemail])
email.attach_file(unrecognizedfile)
try:
email.attach_file(unrecognizedfile)
except IOError:
pass
res = email.send()
# remove tcx file
os.remove(unrecognizedfile)
try:
os.remove(unrecognizedfile)
except:
pass
return 1
@@ -325,7 +331,7 @@ def handle_otwsetpower(f1,boattype,weightvalue,
#delta,cpvalues,avgpower = datautils.getsinglecp(rowdata.df)
res,btvalues = utils.isbreakthrough(delta,cpvalues,ps[0],ps[1],ps[2],ps[3],ratio)
res,btvalues,res2 = utils.isbreakthrough(delta,cpvalues,ps[0],ps[1],ps[2],ps[3],ratio)
if res:
handle_sendemail_breakthrough(workoutid,email,
first_name,