commit | d67c60ff8116e6c9ac73ad8cd556573a73598b4f | [log] [tgz] |
---|---|---|
author | Benjamin Peterson <benjamin@python.org> | Mon Feb 16 18:22:15 2009 +0000 |
committer | Benjamin Peterson <benjamin@python.org> | Mon Feb 16 18:22:15 2009 +0000 |
tree | 9a2e3ad5d5216d3a553b855b223cbc7b256bcbf8 | |
parent | 821d0f8b1f7666d1bc85ffdc8ca9cd4a64eaec17 [diff] [blame] |
remove another use of cmp()
diff --git a/Lib/distutils/version.py b/Lib/distutils/version.py index 7781437..79d458d 100644 --- a/Lib/distutils/version.py +++ b/Lib/distutils/version.py
@@ -338,7 +338,12 @@ if isinstance(other, str): other = LooseVersion(other) - return cmp(self.version, other.version) + if self.version == other.version: + return 0 + if self.version < other.version: + return -1 + if self.version > other.version: + return 1 # end class LooseVersion