Check if any functions are subscribed to a callback event
This commit is contained in:
parent
2d0a7aa87a
commit
399a4a53ee
1 changed files with 9 additions and 0 deletions
|
|
@ -51,3 +51,12 @@ class Callbacks():
|
||||||
kwargs = c_info["kwargs"]
|
kwargs = c_info["kwargs"]
|
||||||
|
|
||||||
c(*args, **kwargs)
|
c(*args, **kwargs)
|
||||||
|
|
||||||
|
def exists(self, event):
|
||||||
|
"""
|
||||||
|
exists(event) -> bool
|
||||||
|
|
||||||
|
Are any functions subscribed to this event?
|
||||||
|
"""
|
||||||
|
|
||||||
|
return event in self._callbacks
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue