diff options
author | Simon Glass <sjg@chromium.org> | 2021-10-23 17:26:12 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-11-28 16:51:51 -0700 |
commit | 452e8c9086a9f95739582da5ccc2130e4bf1ae8b (patch) | |
tree | 1d5efba0d146dcd1a6a449963ea738cc6e4ff73e | |
parent | 689d0a1cb04cfc4bf9588660d03084c324bc10be (diff) | |
download | u-boot-452e8c9086a9f95739582da5ccc2130e4bf1ae8b.zip u-boot-452e8c9086a9f95739582da5ccc2130e4bf1ae8b.tar.gz u-boot-452e8c9086a9f95739582da5ccc2130e4bf1ae8b.tar.bz2 |
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>
-rw-r--r-- | test/py/multiplexed_log.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/py/multiplexed_log.py b/test/py/multiplexed_log.py index 9325fae..6688207 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) |