pragma
This commit is contained in:
@@ -539,6 +539,7 @@ def get_strava_stream(r,metric,stravaid,series_type='time',fetchresolution='high
|
|||||||
with open('data.txt', 'w') as outfile:
|
with open('data.txt', 'w') as outfile:
|
||||||
json.dump(s.json(), outfile)
|
json.dump(s.json(), outfile)
|
||||||
|
|
||||||
|
try:
|
||||||
for data in s.json():
|
for data in s.json():
|
||||||
y = None
|
y = None
|
||||||
try:
|
try:
|
||||||
@@ -546,9 +547,11 @@ def get_strava_stream(r,metric,stravaid,series_type='time',fetchresolution='high
|
|||||||
return np.array(data['data'])
|
return np.array(data['data'])
|
||||||
except TypeError: # pragma: no cover
|
except TypeError: # pragma: no cover
|
||||||
return None
|
return None
|
||||||
|
except JSONDecodeError:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
return None # pragma: no cover
|
||||||
|
|
||||||
def allmonths(startdate,enddate):
|
def allmonths(startdate,enddate):
|
||||||
d = startdate
|
d = startdate
|
||||||
while d<enddate:
|
while d<enddate:
|
||||||
|
|||||||
Reference in New Issue
Block a user