Skip to content

Commit 85d7eee

Browse files
committed
-
1 parent 8018c35 commit 85d7eee

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

python_toolbox/monkeypatching_tools.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
'''Tools for monkeypatching.'''
55

6+
import sys
67
import types
78

89
from python_toolbox import misc_tools
@@ -64,6 +65,8 @@ def decorator(function):
6465
raise NotImplemented
6566
name_ = function.getter.__name__
6667
elif isinstance(function, (classmethod, staticmethod)):
68+
if sys.version_info[:2] <= (2, 6):
69+
name_ = function.__name__
6770
name_ = function.__func__.__name__
6871
else:
6972
raise NotImplemented("`monkeypatch_method` doesn't know how "

0 commit comments

Comments
 (0)