Module: Allow passing of arguments to callable callbacks.
This commit is contained in:
parent
32ab77c203
commit
d07168beb7
@ -102,7 +102,7 @@ class Module(SettingsBase):
|
|||||||
self.logger.debug("cb=%s args=%s" % (cb, args))
|
self.logger.debug("cb=%s args=%s" % (cb, args))
|
||||||
|
|
||||||
if callable(cb):
|
if callable(cb):
|
||||||
cb(self)
|
cb(self, *args)
|
||||||
elif hasattr(self, cb):
|
elif hasattr(self, cb):
|
||||||
if cb is not "run":
|
if cb is not "run":
|
||||||
getattr(self, cb)(*args)
|
getattr(self, cb)(*args)
|
||||||
|
Loading…
Reference in New Issue
Block a user