Don't throw an exception when a function does not exist in the registry function list

This commit is contained in:
Raoul Snyman 2017-10-23 15:23:05 -07:00
parent d5ab3340eb
commit fb7bff01bc

View File

@ -128,7 +128,7 @@ class Registry(object):
:param event: The function description..
:param function: The function to be called when the event happens.
"""
if event in self.functions_list:
if event in self.functions_list and function in self.functions_list[event]:
self.functions_list[event].remove(function)
def execute(self, event, *args, **kwargs):