dbrgn / fahrplan

A SBB/CFF/FFS commandline based timetable client. Project started at make.opendata.ch.
GNU General Public License v3.0
132 stars 20 forks source link

New features, bug fixes, code improvements #22

Closed frinkelpi closed 7 years ago

frinkelpi commented 8 years ago
dbrgn commented 8 years ago

Thanks! That's quite some changes :) I'll review them this week, hopefully.

dbrgn commented 8 years ago

But first of all, could you include texttable via PyPI instead of using submodules?

frinkelpi commented 8 years ago

Sure, that's because I had to submit a fix, but the module has now been updated on pypi, and I'll drop the submodule dependency.

dbrgn commented 7 years ago

I'm getting an exception on the following query:

$ python -m fahrplan.main von burgdorf nach rüti via bern
Traceback (most recent call last):
  File "/usr/lib64/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/danilo/Projects/fahrplan/fahrplan/main.py", line 109, in <module>
    main()
  File "/home/danilo/Projects/fahrplan/fahrplan/main.py", line 95, in main
    data = getConnections(args, (output_format == Formats.FULL), proxy_host)
  File "/home/danilo/Projects/fahrplan/fahrplan/API.py", line 134, in getConnections
    data["connections"] = [_parse_connection(c, include_sections) for c in data["connections"]]
  File "/home/danilo/Projects/fahrplan/fahrplan/API.py", line 134, in <listcomp>
    data["connections"] = [_parse_connection(c, include_sections) for c in data["connections"]]
  File "/home/danilo/Projects/fahrplan/fahrplan/API.py", line 115, in _parse_connection
    section = _parse_section(con_sections[0], connection)
  File "/home/danilo/Projects/fahrplan/fahrplan/API.py", line 62, in _parse_section
    section['travelwith'] = journey["name"]
TypeError: 'NoneType' object is not subscriptable
dbrgn commented 7 years ago

And sorry for not reviewing sooner. In the future, sending smaller pull requests makes it easier and faster to review and merge :)

dbrgn commented 7 years ago

Thanks! If you have further improvements, small pull requests help :)