mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-18 19:04:38 +00:00
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>
This commit is contained in:
parent
689d0a1cb0
commit
452e8c9086
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue