Skip to content

Commit 51be240

Browse files
authored
Merge pull request #21 from TransitApp/jsteelz/fix-lat-lon-comp-none
Allow comparisons to None on LatLon
2 parents 054c927 + d550ab9 commit 51be240

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
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):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from setuptools import setup, find_packages
22

33
setup(name='py-gtfs-loader',
4-
version='0.1.14',
4+
version='0.1.15',
55
description='Load GTFS',
66
url='https://github.com/TransitApp/py-gtfs-loader',
77
author='Nicholas Paun, Jonathan Milot',

0 commit comments

Comments
 (0)