diff options
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | 2024-02-08 18:46:27 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2024-02-08 18:46:27 +0000 |
commit | fa63a4b24f96a4b401384e157d8e07555d0c9e5f (patch) | |
tree | e4ea0e067994506e218a0a964a341204390fe961 | |
parent | 78f6cedd5cf92dc20b47f3eae5f2b3c963655e0b (diff) | |
parent | 5e5f2f113ba3731905d6410b1d80fd7826df6828 (diff) | |
download | external_updater-fa63a4b24f96a4b401384e157d8e07555d0c9e5f.tar.gz |
Merge changes I92bb6ce6,I0ac871b6 into main
* changes:
Suppress broad-exception-caught lint.
Fix raise-missing-from lint.
-rw-r--r-- | external_updater.py | 2 | ||||
-rw-r--r-- | fileutils.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/external_updater.py b/external_updater.py index 7ad47c4..5ed558a 100644 --- a/external_updater.py +++ b/external_updater.py @@ -244,7 +244,7 @@ def validate(args: argparse.Namespace) -> None: print(f'Validating {canonical_path}') updater, _ = build_updater(paths[0]) print(updater.validate()) - except Exception: + except Exception: # pylint: disable=broad-exception-caught logging.exception("Failed to check or update %s", paths) diff --git a/fileutils.py b/fileutils.py index d211437..0432d5a 100644 --- a/fileutils.py +++ b/fileutils.py @@ -146,7 +146,7 @@ def canonicalize_project_path(proj_path: Path) -> Path: """ try: return get_relative_project_path(proj_path) - except ValueError: + except ValueError as ex: # A less common use case, but the path might be to a non-local tree, # in which case the path will not be relative to our tree. This # happens when using external_updater in another project like the NDK @@ -158,7 +158,7 @@ def canonicalize_project_path(proj_path: Path) -> Path: # hasn't existed before, so it has no canonical form. raise ValueError( f"{proj_path} must be either an absolute path or relative to {external_path()}" - ) + ) from ex def read_metadata(proj_path: Path) -> metadata_pb2.MetaData: |