diff --git a/yapapi/script/__init__.py b/yapapi/script/__init__.py index 56f57a6a4..0f560a5b9 100644 --- a/yapapi/script/__init__.py +++ b/yapapi/script/__init__.py @@ -75,7 +75,7 @@ def process_batch_event( ) -> CommandEvent: """Event emitting and special events.CommandExecuted logic.""" command = self._commands[event_kwargs["cmd_idx"]] - del event_kwargs["cmd_idx"] + event_kwargs = {key: val for key, val in event_kwargs.items() if key != "cmd_idx"} event = command.emit(event_class, **event_kwargs) if isinstance(event, CommandExecuted):