diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-12-12 21:39:35 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-12-12 21:39:35 +0000 |
commit | 59ed8857c27123c2ceca04464f691c0ff1d283e1 (patch) | |
tree | 4739f70b04347887a766c4ca4fe33b7e16127709 /pym | |
parent | 33597f1013ff6e95d803bcc91db41845f82cef60 (diff) | |
download | portage-59ed8857c27123c2ceca04464f691c0ff1d283e1.tar.gz portage-59ed8857c27123c2ceca04464f691c0ff1d283e1.tar.bz2 portage-59ed8857c27123c2ceca04464f691c0ff1d283e1.zip |
For py3k compat, remove Atom.__cmp__() and use str.__lt__() instead.
(trunk r12199)
svn path=/main/branches/2.1.6/; revision=12232
Diffstat (limited to 'pym')
-rw-r--r-- | pym/portage/dep.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/pym/portage/dep.py b/pym/portage/dep.py index c17602117..9c9c14380 100644 --- a/pym/portage/dep.py +++ b/pym/portage/dep.py @@ -509,7 +509,8 @@ class Atom(object): _str_methods = ("endswith", "find", "index", "lstrip", "replace", "startswith", "split", "strip", "rindex", "rfind", "rstrip", "__getitem__", - "__eq__", "__hash__", "__len__", "__ne__", "__repr__", "__str__") + "__eq__", "__hash__", "__len__", "__lt__", + "__ne__", "__repr__", "__str__") __slots__ = ("__weakref__", "blocker", "cp", "cpv", "operator", "slot", "use") + _str_methods @@ -556,15 +557,6 @@ class Atom(object): use = None obj_setattr(self, "use", use) - def __cmp__(self, other): - self_str = str(self) - other_str = str(other) - if self_str == other_str: - return 0 - if self_str > other_str: - return 1 - return -1 - def __setattr__(self, name, value): raise AttributeError("Atom instances are immutable", self.__class__, name, value) |