summaryrefslogtreecommitdiff
path: root/decorators.py
diff options
context:
space:
mode:
Diffstat (limited to 'decorators.py')
-rw-r--r--decorators.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/decorators.py b/decorators.py
index 66539a7..5b21cd1 100644
--- a/decorators.py
+++ b/decorators.py
@@ -277,10 +277,11 @@ def monkeypatch(klass, methodname=None):
if callable(func):
if sys.version_info < (3, 0):
setattr(klass, name, method_type(func, None, klass))
- elif isinstance(func, types.FunctionType):
- setattr(klass, name, func)
+ #elif isinstance(func, types.FunctionType):
else:
- setattr(klass, name, UnboundMethod(func))
+ setattr(klass, name, func)
+ #else:
+ # setattr(klass, name, UnboundMethod(func))
else:
# likely a property
# this is quite borderline but usage already in the wild ...