def act(self, event, *args, **kwargs):
        """
        Act on the specific life cycle event. The action here is to invoke the hook function on all registered plugins.
        *args and **kwargs will be passed directly to the plugin's hook functions

        :param samtranslator.plugins.LifeCycleEvents event: Event to act upon
        :return: Nothing
        :raises ValueError: If event is not a valid life cycle event
        :raises NameError: If a plugin does not have the hook method defined
        :raises Exception: Any exception that a plugin raises
        """

        if not isinstance(event, LifeCycleEvents):
            raise ValueError("'event' must be an instance of LifeCycleEvents class")

        method_name = "on_" + event.name

        for plugin in self._plugins:

            if not hasattr(plugin, method_name):
                raise NameError("'{}' method is not found in the plugin with name '{}'"
                                .format(method_name, plugin.name))

            try:
                getattr(plugin, method_name)(*args, **kwargs)
            except InvalidResourceException as ex:
                # Don't need to log these because they don't result in crashes
                raise ex
            except Exception as ex:
                logging.exception("Plugin '%s' raised an exception: %s", plugin.name, ex)
                raise ex
def act ( self , event , * args , ** kwargs ) : if not isinstance ( event , LifeCycleEvents ) : raise ValueError ( "'event' must be an instance of LifeCycleEvents class" ) method_name = "on_" + event . name for plugin in self . _plugins : if not hasattr ( plugin , method_name ) : raise NameError ( "'{}' method is not found in the plugin with name '{}'" . format ( method_name , plugin . name ) ) try : getattr ( plugin , method_name ) ( * args , ** kwargs ) except InvalidResourceException as ex : raise ex except Exception as ex : logging . exception ( "Plugin '%s' raised an exception: %s" , plugin . name , ex ) raise ex
Act on the specific life cycle event. The action here is to invoke the hook function on all registered plugins.
        *args and **kwargs will be passed directly to the plugin's hook functions

        :param samtranslator.plugins.LifeCycleEvents event: Event to act upon
        :return: Nothing
        :raises ValueError: If event is not a valid life cycle event
        :raises NameError: If a plugin does not have the hook method defined
        :raises Exception: Any exception that a plugin raises