launch.event_handlers.on_shutdown module

Module for OnShutdown class.

class launch.event_handlers.on_shutdown.OnShutdown[source]

Bases: BaseEventHandler

Convenience class for handling the launch shutdown event.

__init__(*, on_shutdown: LaunchDescriptionEntity | Iterable[LaunchDescriptionEntity] | Callable[[Shutdown, LaunchContext], LaunchDescriptionEntity | Iterable[LaunchDescriptionEntity] | None], **kwargs) None[source]

Create an OnShutdown event handler.

handle(event: Event, context: LaunchContext) LaunchDescriptionEntity | Iterable[LaunchDescriptionEntity] | None[source]

Handle the given event.

property handler_description: str

Return the string description of the handler.

property matcher_description

Return the string description of the matcher.

launch.event_handlers.on_shutdown.gen_handler(entities: LaunchDescriptionEntity | Iterable[LaunchDescriptionEntity]) Callable[[Shutdown, LaunchContext], LaunchDescriptionEntity | Iterable[LaunchDescriptionEntity]][source]