diff mbox series

[v2,18/39] patman: Use a ValueError exception if tools.Run() fails

Message ID 20210925003055.759305-6-sjg@chromium.org
State Superseded
Delegated to: Heinrich Schuchardt
Headers show
Series efi: Improvements to U-Boot running on top of UEFI | expand

Commit Message

Simon Glass Sept. 25, 2021, 12:30 a.m. UTC
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>
---

(no changes since v1)

 tools/patman/tools.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tools/patman/tools.py b/tools/patman/tools.py
index 877e37cd8da..23ddb124804 100644
--- a/tools/patman/tools.py
+++ b/tools/patman/tools.py
@@ -348,7 +348,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