Revert "Lift restriction that "run" cannot be used as a callback"
This reverts commit d018be872a
.
This commit is contained in:
parent
57be3c45a9
commit
9759d6eea5
@ -101,8 +101,12 @@ class Module(SettingsBase):
|
|||||||
elif our_method:
|
elif our_method:
|
||||||
cb(self, *args)
|
cb(self, *args)
|
||||||
elif hasattr(self, cb):
|
elif hasattr(self, cb):
|
||||||
self.__log_button_event(button, cb, args, "Member callback")
|
if cb is not "run":
|
||||||
getattr(self, cb)(*args)
|
# CommandEndpoint already calls run() after every
|
||||||
|
# callback to instantly update any changed state due
|
||||||
|
# to the callback's actions.
|
||||||
|
self.__log_button_event(button, cb, args, "Member callback")
|
||||||
|
getattr(self, cb)(*args)
|
||||||
else:
|
else:
|
||||||
self.__log_button_event(button, cb, args, "External command")
|
self.__log_button_event(button, cb, args, "External command")
|
||||||
if hasattr(self, "data"):
|
if hasattr(self, "data"):
|
||||||
|
Loading…
Reference in New Issue
Block a user