[roll] Roll fuchsia [superproject] Roll third_party/pigweed pw_presubmit: Fix OwnersError constructor
The previous OwnersError.__init__ stored the message argument in a
custom attribute rather than passing it to Exception.__init__. This
caused str() of the exception to be empty, (or more precisely, repr() to
show just the exception type name), leading to a confusing backtrace:
20230405 21:07:40 ERR Presubmit check owners_lint_checks failed!
Traceback (most recent call last):
...
File ".../pw_presubmit/owners_checks.py", line 131, in __init__
raise OwnersDependencyError(error_msg)
pw_presubmit.owners_checks.OwnersDependencyError
^^^???^^^
The use of Exception.message is obsolete:
https://stackoverflow.com/q/1272138
We can instead omit OwnersError.__init__ and use the base class
Exception.__init__ which accepts a message as the first argument.
This fixes the backtrace:
20230406 15:11:15 ERR Presubmit check owners_lint_checks failed!
Traceback (most recent call last):
...
File ".../pw_presubmit/owners_checks.py", line 126, in __init__
raise OwnersDependencyError(
pw_presubmit.owners_checks.OwnersDependencyError: Tried to import
.../OWNERS but it does not exist
This also required replacing `err.message` with `str(err)` -- or
just `err` if it is being formatted with `%s`.
Also fixed a typo: "exists" -> "exist".
Tested: Ran `pw presubmit --step owners_lint_checks` on a repo with a
missing OWNERS file, and confirmed that the error message which was
previously missing is now visible.
Original-Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/137550
Original-Revision: 56b11ffa2f279e6bfa26af586ed75c4b6f501872
GitOrigin-RevId: 28daa5c3d257f46595f0f41d8e4bfa04e00a769c
Roller-URL: https://ci.chromium.org/b/8784539743345586529
CQ-Do-Not-Cancel-Tryjobs: true
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/832083
Original-Revision: d5954c909ed840a0a53bf0ef58bdfb85d5930943
Change-Id: I7d1bef85f9fd0937285c947b7f7281735ebfbc46
This repository contains Fuchsia's Global Integration manifest files.
All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.
Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.
First install Jiri.
Next run:
$ jiri init $ jiri import minimal https://fuchsia.googlesource.com/integration $ jiri update
Third party projects should have their own subdirectory in ./third_party.