grote / osm2gtfs

Turn OpenStreetMap data and schedule information into GTFS
GNU General Public License v3.0
98 stars 31 forks source link

Bugfix: check for NoneType in OSM Connector #124

Closed ialokim closed 6 years ago

ialokim commented 6 years ago

In case of invalid osm objects, OSMConnector returns None, but always expects a valid Line or Itinerary object. This PR should fix this.

pantierra commented 6 years ago

Maybe it would be good to get a suitable error or warning message. In which cases has this happened? What would be a good warning or error message?

ialokim commented 6 years ago

Maybe it would be good to get a suitable error or warning message. In which cases has this happened?

The subfunctions already print these warning messages out, see line 365 and line 296. So there's no need to add another message, only to handle the NoneType correctly.