passes checks in python3
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from __future__ import unicode_literals, absolute_import
|
||||
# All the functionality needed to connect to Strava
|
||||
|
||||
# Python
|
||||
@@ -33,8 +34,8 @@ from rowingdata import rowingdata
|
||||
import pandas as pd
|
||||
from rowers.models import Rower,Workout
|
||||
from rowers.models import checkworkoutuser
|
||||
import dataprep
|
||||
from dataprep import columndict
|
||||
import rowers.dataprep as dataprep
|
||||
from rowers.dataprep import columndict
|
||||
|
||||
from io import StringIO
|
||||
|
||||
@@ -51,8 +52,8 @@ from rowsandall_app.settings import (
|
||||
baseurl = 'https://polaraccesslink.com/v3'
|
||||
|
||||
|
||||
from utils import NoTokenError, custom_exception_handler
|
||||
import mytypes
|
||||
from rowers.utils import NoTokenError, custom_exception_handler
|
||||
import rowers.mytypes as mytypes
|
||||
|
||||
# Exchange access code for long-lived access token
|
||||
def get_token(code):
|
||||
@@ -126,7 +127,7 @@ from rowers.utils import isprorower
|
||||
def get_all_new_workouts(available_data,testing=False):
|
||||
for record in available_data:
|
||||
if testing:
|
||||
print record
|
||||
print(record)
|
||||
if record['data-type'] == 'EXERCISE':
|
||||
try:
|
||||
r = Rower.objects.get(polaruserid=record['user-id'])
|
||||
@@ -134,7 +135,7 @@ def get_all_new_workouts(available_data,testing=False):
|
||||
if r.polar_auto_import and isprorower(r):
|
||||
exercise_list = get_polar_workouts(u)
|
||||
if testing:
|
||||
print exercise_list
|
||||
print(exercise_list)
|
||||
except Rower.DoesNotExist:
|
||||
pass
|
||||
|
||||
@@ -313,8 +314,6 @@ def get_polar_workout(user,id,transactionid):
|
||||
response = requests.get(url,headers = headers2)
|
||||
|
||||
if response.status_code == 200:
|
||||
print response.text
|
||||
|
||||
result = response.text
|
||||
# commit transaction
|
||||
response = requests.put(url,headers=headers)
|
||||
|
||||
Reference in New Issue
Block a user