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:
@@ -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 = {}
|
||||
|
@@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user