summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-10-24 02:26:12 +0300
committerSimon Glass <sjg@chromium.org>2021-11-29 02:51:51 +0300
commit452e8c9086a9f95739582da5ccc2130e4bf1ae8b (patch)
tree1d5efba0d146dcd1a6a449963ea738cc6e4ff73e /test
parent689d0a1cb04cfc4bf9588660d03084c324bc10be (diff)
downloadu-boot-452e8c9086a9f95739582da5ccc2130e4bf1ae8b.tar.xz
test/py: Raise a ValueError if a command fails
At present an Exception is raised if a command fails. This is a very broad class and makes it difficult for callers to catch the error without also catching other things, like programming bugs. Change it to ValueError to make this easier. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test')
-rw-r--r--test/py/multiplexed_log.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/py/multiplexed_log.py b/test/py/multiplexed_log.py
index 9325fae46d..6688207fb3 100644
--- a/test/py/multiplexed_log.py
+++ b/test/py/multiplexed_log.py
@@ -165,7 +165,7 @@ class RunAndLog(object):
if output and not output.endswith('\n'):
output += '\n'
if exit_status and not exception and not ignore_errors:
- exception = Exception('Exit code: ' + str(exit_status))
+ exception = ValueError('Exit code: ' + str(exit_status))
if exception:
output += str(exception) + '\n'
self.logfile.write(self, output)