quick frontend(app): catch exception when trying to remove a missing listener, and log it
This commit is contained in:
parent
4d7b1a4a56
commit
4f4c4448ee
1 changed files with 5 additions and 1 deletions
|
|
@ -565,7 +565,11 @@ class QuickApp(object):
|
|||
@param callback: callback to remove
|
||||
"""
|
||||
assert type_ in C.LISTENERS
|
||||
self._listeners[type_].pop(callback)
|
||||
try:
|
||||
self._listeners[type_].pop(callback)
|
||||
except KeyError:
|
||||
log.error(
|
||||
f"Trying to remove an inexisting listener (type = {type_}): {callback}")
|
||||
|
||||
def callListeners(self, type_, *args, **kwargs):
|
||||
"""Call the methods which listen type_ event. If a profiles filter has
|
||||
|
|
|
|||
Loading…
Reference in a new issue