grote / osm2gtfs

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

unifies object type after reading the schedule source files #120

Closed jamescr closed 6 years ago

jamescr commented 6 years ago

In configuration.py the schedule_source variable type varies depending if it is a URL or a local file. The former is a file-like and the latter a string. The write_file method in cache.py assumes a file object and tries to read() from the content param, this causes an error when the schedule_source of the configuration file is a local file (a str). With this PR the type of the schedule_source is str in both cases.

grote commented 6 years ago

Alright, by popular demand, I am merging this before #99. Thanks @jamescr!