From 04cee84edea62ba84ae072ffb45f608cbd2c28dc Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 16 Feb 2009 18:25:19 +0000 Subject: [PATCH] Merged revisions 69682 via svnmerge from 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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Lib/distutils/version.py b/Lib/distutils/version.py index 77814377a5..79d458d847 100644 --- a/Lib/distutils/version.py +++ b/Lib/distutils/version.py @@ -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