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

Location.__lt__ throws when comparing message with character at -1 with other messages #116

Closed
smspillaz opened this issue Apr 16, 2015 · 0 comments · Fixed by #117
Closed

Comments

@smspillaz
Copy link
Contributor

The following throws:

l1 = Location("path", None, None, 1, -1)
l2 = Location("path", None, None, 1, 2)

l1 < l2

This is because Location.__lt__ attempts to compare None with an integer. This fails on newer python version.

@smspillaz smspillaz changed the title Message. Location.__lt__ throws when comparing message with character at -1 with other messages Apr 16, 2015
smspillaz added a commit to smspillaz/prospector that referenced this issue Apr 16, 2015
Check if the character value is None and if so substitute it
with -1 when performing comparisons.

Fixes landscapeio#116
smspillaz added a commit to smspillaz/prospector that referenced this issue Apr 16, 2015
Check if the character value is None and if so substitute it
with -1 when performing comparisons.

Fixes landscapeio#116
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant