[PATCH v4 12/34] patman: Use a ValueError exception if tools.Run() fails

Simon Glass sjg at chromium.org
Thu Nov 4 04:09:14 CET 2021


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 at chromium.org>
---

(no changes since v1)

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

diff --git a/tools/patman/tools.py b/tools/patman/tools.py
index 710f1fdcd36..86c4f616206 100644
--- a/tools/patman/tools.py
+++ b/tools/patman/tools.py
@@ -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
-- 
2.34.0.rc0.344.g81b53c2807-goog



More information about the U-Boot mailing list