Fix deregister_handler
This commit is contained in:
parent
b9a2bf786c
commit
883e61909f
@ -99,7 +99,7 @@ class AlertManager(component.Component):
|
|||||||
:param handler: func, the handler function to deregister
|
:param handler: func, the handler function to deregister
|
||||||
"""
|
"""
|
||||||
# Iterate through all handlers and remove 'handler' where found
|
# Iterate through all handlers and remove 'handler' where found
|
||||||
for (key, value) in self.handlers:
|
for (key, value) in self.handlers.items():
|
||||||
if handler in value:
|
if handler in value:
|
||||||
# Handler is in this alert type list
|
# Handler is in this alert type list
|
||||||
value.remove(handler)
|
value.remove(handler)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user