Skip to content

Commit d7ed2c6

Browse files
committed
Allow comparisons to None on LatLon
1 parent 054c927 commit d7ed2c6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

gtfs_loader/lat_lon.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ def distance_to_segment(x, l1, l2):
7171
return LatLon.EARTH_RADIUS_M * min(d_l1_x, d_l2_x)
7272

7373
def __eq__(self, other):
74+
if other == None:
75+
return False
7476
return self.lat == other.lat and self.lon == other.lon
7577

7678
def __hash__(self):

0 commit comments

Comments
 (0)