diff options
author | Steven Knight <knight@baldmt.com> | 2010-05-19 17:22:18 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2010-05-19 17:22:18 (GMT) |
commit | 70ee995e9464e6ffae6ec456f6e8f419a29ce6be (patch) | |
tree | b753d9d9a12eac02450a06b2775ec2646c31027f | |
parent | 093701db6b7b705bc0f73afc6c933a32c4df100a (diff) | |
download | SCons-70ee995e9464e6ffae6ec456f6e8f419a29ce6be.zip SCons-70ee995e9464e6ffae6ec456f6e8f419a29ce6be.tar.gz SCons-70ee995e9464e6ffae6ec456f6e8f419a29ce6be.tar.bz2 |
Fix breakage in how AddMethod() handles instances.
-rw-r--r-- | src/engine/SCons/Util.py | 2 |
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)) |