]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
patman: Use a ValueError exception if tools.Run() fails
authorSimon Glass <sjg@chromium.org>
Thu, 4 Nov 2021 03:09:14 +0000 (21:09 -0600)
committerSimon Glass <sjg@chromium.org>
Sat, 13 Nov 2021 15:16:39 +0000 (08:16 -0700)
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>
tools/patman/tools.py

index 710f1fdcd361e4820a56c62ef37a3dbf77b3e88e..86c4f6162064761ba283281ff4c075c3fb90282a 100644 (file)
@@ -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