diff options
| author | Aymeric Augustin | 2013-10-17 09:03:06 +0200 |
|---|---|---|
| committer | Aymeric Augustin | 2013-10-17 18:24:58 +0200 |
| commit | 06c01648909072aec715535cfa796b58ce287e21 (patch) | |
| tree | 09b5aa5402901fdc6e8414edb9a692159e7597fd /debug_toolbar/utils/tracking/__init__.py | |
| parent | 90b1c1c5bafacc4c9967a427224f7ded935bb4a5 (diff) | |
| download | django-debug-toolbar-06c01648909072aec715535cfa796b58ce287e21.tar.bz2 | |
Update introspection code.
Diffstat (limited to 'debug_toolbar/utils/tracking/__init__.py')
| -rw-r--r-- | debug_toolbar/utils/tracking/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/debug_toolbar/utils/tracking/__init__.py b/debug_toolbar/utils/tracking/__init__.py index ac00f4c..4fbefa5 100644 --- a/debug_toolbar/utils/tracking/__init__.py +++ b/debug_toolbar/utils/tracking/__init__.py @@ -52,10 +52,10 @@ def _replace_function(func, wrapped): else: module = import_module(func.__module__) setattr(module, func.__name__, wrapped) - elif getattr(func, 'im_self', None): - setattr(func.im_self, func.__name__, classmethod(wrapped)) + elif getattr(func, '__self__', None): + setattr(func.__self__, func.__name__, classmethod(wrapped)) elif hasattr(func, 'im_class'): - # for unbound methods + # for unbound methods - Python 2 only setattr(func.im_class, func.__name__, wrapped) else: raise NotImplementedError |
