summaryrefslogtreecommitdiffstats
path: root/bin/scons-proc.py
diff options
context:
space:
mode:
authorStefan Zimmermann <zimmermann.code@gmail.com>2014-03-31 15:21:40 (GMT)
committerStefan Zimmermann <zimmermann.code@gmail.com>2014-03-31 15:21:40 (GMT)
commit87b458d186fe0553b054b8eeb7d57c80e0a54f21 (patch)
treebbc61ec90d436c8b470eb70bf9c09ed552261ef7 /bin/scons-proc.py
parentfd24c4ea622e271936c2df2a5efa484cd351bd9c (diff)
downloadSCons-87b458d186fe0553b054b8eeb7d57c80e0a54f21.zip
SCons-87b458d186fe0553b054b8eeb7d57c80e0a54f21.tar.gz
SCons-87b458d186fe0553b054b8eeb7d57c80e0a54f21.tar.bz2
More __cmp__ to __eq__ (and __lt__). Resolved some UnboundLocalErrors after except.
Diffstat (limited to 'bin/scons-proc.py')
-rw-r--r--bin/scons-proc.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/bin/scons-proc.py b/bin/scons-proc.py
index b93b25a..138cff7 100644
--- a/bin/scons-proc.py
+++ b/bin/scons-proc.py
@@ -231,10 +231,15 @@ class Proxy(object):
"""Retrieve the entire wrapped object"""
return self.__subject
- def __cmp__(self, other):
+ def __eq__(self, other):
if issubclass(other.__class__, self.__subject.__class__):
- return cmp(self.__subject, other)
- return cmp(self.__dict__, other.__dict__)
+ return self.__subject == other
+ return self.__dict__ == other.__dict__
+
+ ## def __lt__(self, other):
+ ## if issubclass(other.__class__, self.__subject.__class__):
+ ## return self.__subject < other
+ ## return self.__dict__ < other.__dict__
class SConsThing(Proxy):
def idfunc(self):