mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-12-08 20:39:01 +00:00
Remove py2 incompatible raise in WeakMethod backport
This commit is contained in:
@@ -99,7 +99,7 @@ class WeakMethod(weakref.ref):
|
|||||||
func = meth.__func__
|
func = meth.__func__
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
raise TypeError("argument should be a bound method, not {0}"
|
raise TypeError("argument should be a bound method, not {0}"
|
||||||
.format(type(meth))) from None
|
.format(type(meth)))
|
||||||
def _cb(arg):
|
def _cb(arg):
|
||||||
# The self-weakref trick is needed to avoid creating a reference
|
# The self-weakref trick is needed to avoid creating a reference
|
||||||
# cycle.
|
# cycle.
|
||||||
|
|||||||
Reference in New Issue
Block a user