Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
step: set event source for bound methods
It is possible to call the step function not via the @step decorator but directly. In case getattr() is used to retrieve an object's method it will be a bound method object (instead of a function object when used via the decorator). The signature of a bound method does not contain self as a parameter, so the event source will always be None. Currently only the GraphStrategy calls the step function directly. Fix the event source in these cases by using func.__self__ for bound methods. Signed-off-by: Bastian Krause <bst@pengutronix.de>
- Loading branch information