mirror of
https://xff.cz/git/u-boot/
synced 2025-09-27 13:31:16 +02:00
patman: Use a ValueError exception if tools.Run() fails
The Exception base class is a very vague and could be confusing to the test system. Use the more specific ValueError exception instead. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -349,7 +349,7 @@ def Run(name, *args, **kwargs):
|
|||||||
result = command.RunPipe([all_args], capture=True, capture_stderr=True,
|
result = command.RunPipe([all_args], capture=True, capture_stderr=True,
|
||||||
env=env, raise_on_error=False, binary=binary)
|
env=env, raise_on_error=False, binary=binary)
|
||||||
if result.return_code:
|
if result.return_code:
|
||||||
raise Exception("Error %d running '%s': %s" %
|
raise ValueError("Error %d running '%s': %s" %
|
||||||
(result.return_code,' '.join(all_args),
|
(result.return_code,' '.join(all_args),
|
||||||
result.stderr))
|
result.stderr))
|
||||||
return result.stdout
|
return result.stdout
|
||||||
|
Reference in New Issue
Block a user