summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2010-05-19 17:22:18 (GMT)
committerSteven Knight <knight@baldmt.com>2010-05-19 17:22:18 (GMT)
commit70ee995e9464e6ffae6ec456f6e8f419a29ce6be (patch)
treeb753d9d9a12eac02450a06b2775ec2646c31027f
parent093701db6b7b705bc0f73afc6c933a32c4df100a (diff)
downloadSCons-70ee995e9464e6ffae6ec456f6e8f419a29ce6be.zip
SCons-70ee995e9464e6ffae6ec456f6e8f419a29ce6be.tar.gz
SCons-70ee995e9464e6ffae6ec456f6e8f419a29ce6be.tar.bz2
Fix breakage in how AddMethod() handles instances.
-rw-r--r--src/engine/SCons/Util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/engine/SCons/Util.py b/src/engine/SCons/Util.py
index bd653ec..dd47259 100644
--- a/src/engine/SCons/Util.py
+++ b/src/engine/SCons/Util.py
@@ -1378,7 +1378,7 @@ def AddMethod(obj, function, name=None):
if hasattr(obj, '__class__') and obj.__class__ != types.TypeType:
# "obj" is an instance, so it gets a bound method.
- setattr(obj, name, types.MethodType(function, obj, cls))
+ setattr(obj, name, types.MethodType(function, obj, obj.__class__))
else:
# "obj" is a class, so it gets an unbound method.
setattr(obj, name, types.MethodType(function, None, obj))