From d7dcbcae9204c3c540a7a4a3c0fd6270780524c5 Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Tue, 13 Jun 2017 11:50:53 +0100 Subject: [PATCH] RuntimeConfig: Handle initialisation failure of RT plugin Previously if one of the runtime parameters failed to initialize it would cause the the entire setup process to fail. Now if an error is encountered e.g. a core went offline when trying to read its information, that particular parameter will be disabled along with it's supported parameters. This means that only if a user attempts to use the RT parameter will execution be stopped however it will raise a potentially misleading unsupported parameter error. --- wa/framework/target/runtime_config.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wa/framework/target/runtime_config.py b/wa/framework/target/runtime_config.py index 4d79bfaa..c69f0630 100644 --- a/wa/framework/target/runtime_config.py +++ b/wa/framework/target/runtime_config.py @@ -26,6 +26,7 @@ class RuntimeParameter(Parameter): class RuntimeConfig(Plugin): + name = None kind = 'runtime-config' @property @@ -41,7 +42,12 @@ class RuntimeConfig(Plugin): self.target = target self._target_checked = False self._runtime_params = {} - self.initialize() + try: + self.initialize() + except TargetError: + msg = 'Failed to initialize: "{}"' + self.logger.debug(msg.format(self.name)) + self._runtime_params = {} def initialize(self): raise NotImplementedError()