diff options
author | Simon Glass <sjg@chromium.org> | 2021-10-24 02:26:12 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-11-29 02:51:51 +0300 |
commit | 452e8c9086a9f95739582da5ccc2130e4bf1ae8b (patch) | |
tree | 1d5efba0d146dcd1a6a449963ea738cc6e4ff73e /test/py | |
parent | 689d0a1cb04cfc4bf9588660d03084c324bc10be (diff) | |
download | u-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/py')
-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 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) |