Move Config creation out of Context constructor
This helps to avoid circular dependencies. It also allows the Config constructor to make use of the global context. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
committed by
Daniel Wagner
parent
594fa97692
commit
f5cea27269
@@ -25,6 +25,7 @@
|
||||
|
||||
import os
|
||||
from .context import create_global_context
|
||||
from .config import Config
|
||||
from .libkas import find_program, run_cmd, kasplugin
|
||||
from .libcmds import (Macro, Command, SetupDir, CleanupSSHAgent,
|
||||
SetupSSHAgent, SetupEnviron, SetupRepos,
|
||||
@@ -71,7 +72,9 @@ class Build:
|
||||
if args.cmd != 'build':
|
||||
return False
|
||||
|
||||
ctx = create_global_context(args.config, args.target, args.task)
|
||||
ctx = create_global_context()
|
||||
ctx.config = Config(args.config, args.target, args.task)
|
||||
ctx.config.set_context(ctx)
|
||||
|
||||
macro = Macro()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user