Lift restriction that "run" cannot be used as a callback

This commit is contained in:
enkore 2016-02-01 12:18:03 +01:00
parent 5dbb8b6cac
commit d018be872a

View File

@ -101,9 +101,8 @@ class Module(SettingsBase):
elif our_method: elif our_method:
cb(self, *args) cb(self, *args)
elif hasattr(self, cb): elif hasattr(self, cb):
if cb is not "run": self.__log_button_event(button, cb, args, "Member callback")
self.__log_button_event(button, cb, args, "Member callback") getattr(self, cb)(*args)
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"):