config: Make target argument optional in Config()

The target argument is only used when initializing the build plugin so
we can make it optional. This allows us to simplify the call to Config()
in the shell plugin and in other future plugins.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Paul Barker 2020-11-06 12:50:20 +01:00 committed by Jan Kiszka
parent bad24e7468
commit c2e62df73f
2 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ class Config:
"""
Implements the kas configuration based on config files.
"""
def __init__(self, filename, target, task=None):
def __init__(self, filename, target=None, task=None):
self._override_target = target
self._override_task = task
self._config = {}

View File

@ -80,7 +80,7 @@ class Shell:
"""
ctx = create_global_context(args)
ctx.config = Config(args.config, None, None)
ctx.config = Config(args.config)
macro = Macro()