Skip to content

Commit

Permalink
patman: Use a ValueError exception if tools.Run() fails
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
sjg20 committed Nov 13, 2021
1 parent a51673e commit e5eaf81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/patman/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def Run(name, *args, **kwargs):
result = command.RunPipe([all_args], capture=True, capture_stderr=True,
env=env, raise_on_error=False, binary=binary)
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.stderr))
return result.stdout
Expand Down

0 comments on commit e5eaf81

Please sign in to comment.