For py3k compat, remove Package.__cmp__() and related cmp() function call.
authorZac Medico <zmedico@gentoo.org>
Tue, 9 Dec 2008 04:57:01 +0000 (04:57 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 9 Dec 2008 04:57:01 +0000 (04:57 -0000)
svn path=/main/trunk/; revision=12183

pym/_emerge/__init__.py

index 1f782b4517c4bdeda5cd82fde9f340a559fa72e4..c9b7113af3ebeab1dd9b84dcc9091e63c8002376 100644 (file)
@@ -1500,13 +1500,6 @@ class Package(Task):
                                (self.type_name, self.root, self.cpv, self.operation)
                return self._hash_key
 
-       def __cmp__(self, other):
-               if self > other:
-                       return 1
-               elif self < other:
-                       return -1
-               return 0
-
        def __lt__(self, other):
                if other.cp != self.cp:
                        return False
@@ -9791,7 +9784,7 @@ class Scheduler(PollScheduler):
                        portage.match_from_list(
                        portage.const.PORTAGE_PACKAGE_ATOM, [pkg]):
                        if self._running_portage:
-                               return cmp(pkg, self._running_portage) != 0
+                               return pkg.cpv != self._running_portage.cpv
                        return True
                return False