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
@@ -27,7 +27,7 @@
|
||||
import subprocess
|
||||
import os
|
||||
from .libkas import kasplugin
|
||||
from .context import Context
|
||||
from .context import create_global_context
|
||||
from .libcmds import (Macro, Command, SetupDir, SetupEnviron,
|
||||
WriteBBConfig, SetupHome, ReposApplyPatches,
|
||||
CleanupSSHAgent, SetupSSHAgent, SetupRepos)
|
||||
@@ -75,7 +75,7 @@ class Shell:
|
||||
if args.cmd != 'shell':
|
||||
return False
|
||||
|
||||
ctx = Context(args.config, args.target, None)
|
||||
ctx = create_global_context(args.config, args.target, None)
|
||||
|
||||
macro = Macro()
|
||||
|
||||
|
Reference in New Issue
Block a user