fixing errors
This commit is contained in:
@@ -80,11 +80,14 @@ def getnearestcourses(lat_lon, courses, whatisnear=150, strict=False):
|
||||
newlist = []
|
||||
counter = 0
|
||||
for c in courses:
|
||||
distance = howfaris(lat_lon, c)
|
||||
try:
|
||||
distance = howfaris(lat_lon, c)
|
||||
|
||||
if distance < whatisnear:
|
||||
newlist.append(c)
|
||||
counter += 1
|
||||
if distance < whatisnear:
|
||||
newlist.append(c)
|
||||
counter += 1
|
||||
except TypeError:
|
||||
pass
|
||||
|
||||
if counter > 0:
|
||||
courses = newlist
|
||||
|
||||
Reference in New Issue
Block a user