From 75a37ff6427353fc2437c6e35c198bd495cb2dc1 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Wed, 8 Feb 2017 11:30:42 +0100 Subject: [PATCH] added gzip to OTW power calc --- rowers/tasks.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rowers/tasks.py b/rowers/tasks.py index dea6dd32..b89d11a8 100644 --- a/rowers/tasks.py +++ b/rowers/tasks.py @@ -116,8 +116,11 @@ def handle_otwsetpower(f1,boattype,weightvalue, try: rowdata = rdata(f1) except IOError: - rowdata = rdata(f1+'.csv') - + try: + rowdata = rdata(f1+'.csv') + except IOError: + rowdata = rdata(f1+'.gz') + weightvalue = float(weightvalue) # do something with boat type @@ -154,14 +157,12 @@ def handle_otwsetpower(f1,boattype,weightvalue, subject = "Your Rowsandall OTW calculations are ready" message = "Dear "+first_name+",\n\n" message += "Your Rowsandall OTW calculations are ready.\n" - # message += "You can now create OTW plots with power information and wind corrections.\n\n" message += "Thank you for using rowsandall.com.\n\n" message += "Rowsandall OTW calculations have not been fully implemented yet.\n" message += "We are now running an experimental version for debugging purposes. \n" message += "Your wind/stream corrected plot is available here: http://rowsandall.com/rowers/workout/" message += str(workoutid) message +="/interactiveotwplot\n\n" - # message += "This functionality will be available soon, though.\n\n" message += "Please report any bugs/inconsistencies/unexpected results at rowsandall.slack.com or by reply to this email.\n\n" message += "Best Regards, The Rowsandall Physics Department."