Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch exception if waypoint location is invalid #65

Conversation

weinshec
Copy link
Collaborator

When parsing waypoints from the HTML table it is not guaranteed that the location is in proper format, e.g. hidden stages have '???' in the location field (see e.g. GC3WTTZ). This caused an unhandled exception in Waypoint.from_html().

Fixing this issue by catching the ValueError raised by the geopy.Point() initializer and setting the waypoints location to None.

Christoph Weinsheimer added 2 commits August 19, 2016 23:24
When parsing waypoints from the HTML table it is not guaranteed that the
location is in proper format, e.g. hidden stages have '???' in the
location field (see e.g. GC3WTTZ). This caused an unhandled exception in
`Waypoint.from_html()`.

Fixing this issue by catching the `ValueError` raised by the
`geopy.Point()` initializer and setting the waypoints location to
`None`.
@coveralls
Copy link

coveralls commented Aug 19, 2016

Coverage Status

Coverage decreased (-0.3%) to 94.815% when pulling 4c92886 on weinshec:fix_invalid_waypoint_location_exception into c16e125 on tomasbedrich:master.

@tomasbedrich
Copy link
Owner

tomasbedrich commented Aug 25, 2016

Great! Just one more change before merging: please use .format() to format a logging message.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 94.815% when pulling 5332a7c on weinshec:fix_invalid_waypoint_location_exception into c16e125 on tomasbedrich:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 94.815% when pulling 5332a7c on weinshec:fix_invalid_waypoint_location_exception into c16e125 on tomasbedrich:master.

@tomasbedrich tomasbedrich added this to the 3.6 milestone Aug 26, 2016
@tomasbedrich tomasbedrich merged commit 5dcd27a into tomasbedrich:master Aug 26, 2016
@weinshec
Copy link
Collaborator Author

Thanks for merging!

@weinshec weinshec deleted the fix_invalid_waypoint_location_exception branch August 26, 2016 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants