Improved application
This commit is contained in:
@@ -22,18 +22,20 @@ class Startup(StartupABC):
|
||||
|
||||
def create_application_host(self) -> ApplicationHostABC:
|
||||
self._app_host = ApplicationHost()
|
||||
|
||||
self._app_host.application_runtime.set_runtime_directory(__file__)
|
||||
self._app_host.console_argument_error_function(Error.error)
|
||||
|
||||
self._configuration = self._app_host.configuration
|
||||
self._services = self._app_host.services
|
||||
|
||||
self._app_host.console_argument_error_function(Error.error)
|
||||
|
||||
return self._app_host
|
||||
|
||||
def create_configuration(self) -> ConfigurationABC:
|
||||
self._configuration.add_environment_variables('PYTHON_')
|
||||
self._configuration.add_environment_variables('CPL_')
|
||||
self._configuration.add_console_argument('', 'help', ['h'], '')
|
||||
self._configuration.add_console_argument('', 'version', ['v'], '')
|
||||
self._configuration.add_console_argument('', 'help', ['-h', '-H'], '')
|
||||
self._configuration.add_console_argument('', 'version', ['-v', '-V'], '')
|
||||
self._configuration.add_console_arguments()
|
||||
|
||||
return self._configuration
|
||||
|
Reference in New Issue
Block a user