Remove py2 incompatible raise in WeakMethod backport

This commit is contained in:
Dave Jones
2016-10-22 15:48:12 +01:00
parent 73c0516a28
commit b59af7a08f

View File

@@ -99,7 +99,7 @@ class WeakMethod(weakref.ref):
func = meth.__func__
except AttributeError:
raise TypeError("argument should be a bound method, not {0}"
.format(type(meth))) from None
.format(type(meth)))
def _cb(arg):
# The self-weakref trick is needed to avoid creating a reference
# cycle.