Fix mathematical meaning of the < operator.

This is used for alphabetical queue ordering.
main
Vincent Driessen 13 years ago
parent aa030e0e36
commit 62ae299114

@ -191,7 +191,7 @@ class Queue(object):
def __lt__(self, other): def __lt__(self, other):
if not isinstance(other, Queue): if not isinstance(other, Queue):
raise TypeError('Cannot compare queues to other objects.') raise TypeError('Cannot compare queues to other objects.')
return self.name <= other.name return self.name < other.name
def __hash__(self): def __hash__(self):
return hash(self.name) return hash(self.name)

Loading…
Cancel
Save