From 554548eb4338913e74940c21b90fd1183247e3e0 Mon Sep 17 00:00:00 2001 From: Brendan Jackman Date: Tue, 11 Apr 2017 19:57:52 +0100 Subject: [PATCH] TestEnv: Don't error if target's energy model is invalid It may happen that a target's EAS energy model is "invalid", e.g. because its active state power values are not monotonically increasing with frequency (this is the case with Google Pixel). In this case the EnergyModel construct will throw a ValueError. Don't fail to start LISA in that case, just print a warning. --- libs/utils/env.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/utils/env.py b/libs/utils/env.py index 3ab72dd20..2857f35a2 100644 --- a/libs/utils/env.py +++ b/libs/utils/env.py @@ -551,7 +551,7 @@ class TestEnv(ShareState): try: self._log.info('Attempting to read energy model from target') self.nrg_model = EnergyModel.from_target(self.target) - except (TargetError, RuntimeError) as e: + except (TargetError, RuntimeError, ValueError) as e: self._log.error("Couldn't read target energy model: %s", e) def install_tools(self, tools): -- GitLab