From ce1f057f716e15009864f56fde1339cb60da924e Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 4 Mar 2021 07:18:36 +0100 Subject: [PATCH] Improved command handler --- src/cpl_cli/command_handler.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cpl_cli/command_handler.py b/src/cpl_cli/command_handler.py index 60150e5f..d3eaa9b6 100644 --- a/src/cpl_cli/command_handler.py +++ b/src/cpl_cli/command_handler.py @@ -1,12 +1,15 @@ +from cpl.application.application_runtime_abc import ApplicationRuntimeABC from cpl.dependency_injection.service_abc import ServiceABC from cpl_cli.command import Command class CommandHandler(ServiceABC): - def __init__(self): + def __init__(self, runtime: ApplicationRuntimeABC): ServiceABC.__init__(self) + self._runtime = runtime + self._commands: list[Command] = [] def add_command(self, cmd: Command):