context: Provide global instance
This will avoid the increasingly ugly pushing around of a context instance as parameter to various methods/functions. Everyone can now simply call get_context() after build or shell called create_global_context(). Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
committed by
Daniel Wagner
parent
3fccd1ad3e
commit
594fa97692
@@ -24,7 +24,7 @@
|
||||
"""
|
||||
|
||||
import os
|
||||
from .context import Context
|
||||
from .context import create_global_context
|
||||
from .libkas import find_program, run_cmd, kasplugin
|
||||
from .libcmds import (Macro, Command, SetupDir, CleanupSSHAgent,
|
||||
SetupSSHAgent, SetupEnviron, SetupRepos,
|
||||
@@ -71,7 +71,7 @@ class Build:
|
||||
if args.cmd != 'build':
|
||||
return False
|
||||
|
||||
ctx = Context(args.config, args.target, args.task)
|
||||
ctx = create_global_context(args.config, args.target, args.task)
|
||||
|
||||
macro = Macro()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user