diff options
author | Erik Elmeke <erik@haleytek.corp-partner.google.com> | 2025-04-21 08:04:27 +0200 |
---|---|---|
committer | Erik Elmeke <erik@haleytek.corp-partner.google.com> | 2025-04-22 10:20:08 -0700 |
commit | c061593a12b39f0333ead979c478abfa33fa420c (patch) | |
tree | dfcd09be16701ec66dc02464924debaf897db1b6 | |
parent | a94457d1ce04b31f63734a8c8a1dc668668af39d (diff) | |
download | git-repo-c061593a12b39f0333ead979c478abfa33fa420c.tar.gz |
manifest: Remove redundant re-raise of BaseExceptions
This change should be a noop from a functional point of view.
Exceptions inheriting directly from BaseException (KeyboardInterrupt,
SystemExit) are not caught by "except Exception", they will instead
continue raising upwards the stack, so there is no need to explicitly
catch and re-raise them.
Change-Id: Ic10764af4a6c05d1162f8b21651e7864ed742286
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/469601
Reviewed-by: Mike Frysinger <vapier@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Tested-by: Erik Elmeke <erik@haleytek.corp-partner.google.com>
-rw-r--r-- | manifest_xml.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/manifest_xml.py b/manifest_xml.py index 60d126fb..30c5b590 100644 --- a/manifest_xml.py +++ b/manifest_xml.py | |||
@@ -1328,12 +1328,7 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md | |||
1328 | ) | 1328 | ) |
1329 | # should isolate this to the exact exception, but that's | 1329 | # should isolate this to the exact exception, but that's |
1330 | # tricky. actual parsing implementation may vary. | 1330 | # tricky. actual parsing implementation may vary. |
1331 | except ( | 1331 | except (RuntimeError, ManifestParseError): |
1332 | KeyboardInterrupt, | ||
1333 | RuntimeError, | ||
1334 | SystemExit, | ||
1335 | ManifestParseError, | ||
1336 | ): | ||
1337 | raise | 1332 | raise |
1338 | except Exception as e: | 1333 | except Exception as e: |
1339 | raise ManifestParseError( | 1334 | raise ManifestParseError( |