diff options
author | Mike Frysinger <vapier@google.com> | 2023-06-08 23:23:05 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@google.com> | 2023-06-09 23:10:42 +0000 |
commit | dca21d9487a4392dde2ad95a04b461a5cb4b60ea (patch) | |
tree | 40dc6f9830cd2f3146a35a9b7b2c774acaf03b33 | |
parent | 58dbbba71da293d64ee74fd85898df05798a3f60 (diff) | |
download | repohooks-dca21d9487a4392dde2ad95a04b461a5cb4b60ea.tar.gz |
pre-upload: include "hook" in the error summary
When showing errors to people, it can be confusing to just see the
plain hook name without any context. For example, if bpfmt fails,
we see:
[FAILED] bpfmt
...
This might make people think the bpfmt tool itself failed, or if
they aren't familiar with what bp files are, this short output can
be a little vague. Add the word "hook" to the end to make it a bit
more clear that a specific hook is failing.
[FAILED] bpfmt hook
...
Bug: None
Test: unittests
Change-Id: I86cfd603f612121a655f45e88b4e002071a85f0e
-rwxr-xr-x | pre-upload.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pre-upload.py b/pre-upload.py index 2dc2942..f58f058 100755 --- a/pre-upload.py +++ b/pre-upload.py @@ -127,7 +127,7 @@ class Output(object): Args: error: error string. """ - self.error(self._curr_hook_name, error) + self.error(f'{self._curr_hook_name} hook', error) def hook_warning(self, warning): """Print a warning for a single hook. |