Skip to content

Commit

Permalink
[refs #4] Fixing precedence in comparison - previously it was effecti…
Browse files Browse the repository at this point in the history
…vely: self.name or ("" > other.name)
  • Loading branch information
carlio committed Mar 23, 2015
1 parent 91ad06b commit cbf0a8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion requirements_detector/requirement.py
Expand Up @@ -98,7 +98,7 @@ def __eq__(self, other):
return self.name == other.name and self.url == other.url and self.version_specs == other.version_specs

def __gt__(self, other):
return self.name or "" > other.name or ""
return (self.name or "") > (other.name or "")

@staticmethod
def parse(line, location_defined=None):
Expand Down

0 comments on commit cbf0a8c

Please sign in to comment.