]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merged revisions 69682 via svnmerge from
authorBenjamin Peterson <benjamin@python.org>
Mon, 16 Feb 2009 18:25:19 +0000 (18:25 +0000)
committerBenjamin Peterson <benjamin@python.org>
Mon, 16 Feb 2009 18:25:19 +0000 (18:25 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r69682 | benjamin.peterson | 2009-02-16 12:22:15 -0600 (Mon, 16 Feb 2009) | 1 line

  remove another use of cmp()
........

Lib/distutils/version.py

index 77814377a5fd8f02e84be28efcfba749d29bb50c..79d458d8474c1306089aa583c5c508c1146a542e 100644 (file)
@@ -338,7 +338,12 @@ class LooseVersion (Version):
         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