diff options
author | Sergei Trofimov <sergei.trofimov@arm.com> | 2018-06-22 16:50:49 +0100 |
---|---|---|
committer | Marc Bonnici <marc.bonnici@arm.com> | 2018-06-22 18:04:16 +0100 |
commit | 1b498fa42ddfd9aa58e6e6b10a2947f3b31812bc (patch) | |
tree | 294dacf3d0c16ab27a19b77554e188a62a9010d4 /wa/framework | |
parent | 6486378c89dc5ffd0938d66a13ca81f68ffbaf7a (diff) |
fw/exec: context: make target_info a property
TargetManger.get_target_info() gets invoked twice: first on context
creation, and then a second lime shortly afterwards to populate
RunOutput. Change target_info attribute inside the context to be a
property that redirects to run_output. This will allow the context to be
created earlier, before a target connection is available.
Diffstat (limited to 'wa/framework')
-rw-r--r-- | wa/framework/execution.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/wa/framework/execution.py b/wa/framework/execution.py index 172499e1..c765f592 100644 --- a/wa/framework/execution.py +++ b/wa/framework/execution.py @@ -90,13 +90,16 @@ class ExecutionContext(object): def reboot_policy(self): return self.cm.run_config.reboot_policy + @property + def target_info(self): + return self.run_output.target_info + def __init__(self, cm, tm, output): self.logger = logging.getLogger('context') self.cm = cm self.tm = tm self.run_output = output self.run_state = output.state - self.target_info = self.tm.get_target_info() self.logger.debug('Loading resource discoverers') self.resolver = ResourceResolver(cm.plugin_cache) self.resolver.load() |