passes checks in python3
This commit is contained in:
@@ -26,12 +26,13 @@ queue = django_rq.get_queue('default')
|
||||
queuelow = django_rq.get_queue('low')
|
||||
queuehigh = django_rq.get_queue('low')
|
||||
|
||||
from mytypes import workouttypes,boattypes,otwtypes,workoutsources
|
||||
from rowers.mytypes import workouttypes,boattypes,otwtypes,workoutsources
|
||||
|
||||
try:
|
||||
from cStringIO import StringIO
|
||||
except:
|
||||
from StringIO import StringIO
|
||||
from io import StringIO
|
||||
|
||||
|
||||
from rowers.utils import (
|
||||
geo_distance,serialize_list,deserialize_list,uniqify,
|
||||
@@ -403,34 +404,34 @@ def make_plot(r,w,f1,f2,plottype,title,imagename='',plotnr=0):
|
||||
ftp = ftp*(100.-r.otwslack)/100.
|
||||
|
||||
hrpwrdata = {
|
||||
'hrmax':r.max,
|
||||
'hrut2':r.ut2,
|
||||
'hrut1':r.ut1,
|
||||
'hrat':r.at,
|
||||
'hrtr':r.tr,
|
||||
'hran':r.an,
|
||||
'ftp':ftp,
|
||||
'hrmax':r.max,
|
||||
'hrut2':r.ut2,
|
||||
'hrut1':r.ut1,
|
||||
'hrat':r.at,
|
||||
'hrtr':r.tr,
|
||||
'hran':r.an,
|
||||
'ftp':ftp,
|
||||
'powerperc':serialize_list(powerperc),
|
||||
'powerzones':serialize_list(r.powerzones),
|
||||
}
|
||||
|
||||
# make plot - asynchronous task
|
||||
plotnrs = {
|
||||
'timeplot':1,
|
||||
'distanceplot':2,
|
||||
'pieplot':3,
|
||||
'timeplot':1,
|
||||
'distanceplot':2,
|
||||
'pieplot':3,
|
||||
}
|
||||
|
||||
if plotnr == 0:
|
||||
plotnr = plotnrs[plottype]
|
||||
|
||||
if w.workouttype in otwtypes:
|
||||
plotnr = plotnr+3
|
||||
plotnr = plotnr+3
|
||||
|
||||
|
||||
job = myqueue(queue,handle_makeplot,f1,f2,
|
||||
title,hrpwrdata,
|
||||
plotnr,imagename)
|
||||
title,hrpwrdata,
|
||||
plotnr,imagename)
|
||||
|
||||
try:
|
||||
width,height = Image.open(fullpathimagename).size
|
||||
@@ -451,8 +452,12 @@ def make_plot(r,w,f1,f2,plottype,title,imagename='',plotnr=0):
|
||||
|
||||
return i.id,job.id
|
||||
|
||||
import c2stuff,stravastuff,sporttracksstuff,runkeeperstuff
|
||||
import underarmourstuff,tpstuff
|
||||
import rowers.c2stuff as c2stuff
|
||||
import rowers.stravastuff as stravastuff
|
||||
import rowers.sporttracksstuff as sporttracksstuff
|
||||
import rowers.runkeeperstuff as runkeeperstuff
|
||||
import rowers.underarmourstuff as underarmourstuff
|
||||
import rowers.tpstuff as tpstuff
|
||||
|
||||
def set_workouttype(w,options):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user