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>
This commit is contained in:
Erik Elmeke 2025-04-21 08:04:27 +02:00
parent a94457d1ce
commit c061593a12

View File

@ -1328,12 +1328,7 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md
) )
# should isolate this to the exact exception, but that's # should isolate this to the exact exception, but that's
# tricky. actual parsing implementation may vary. # tricky. actual parsing implementation may vary.
except ( except (RuntimeError, ManifestParseError):
KeyboardInterrupt,
RuntimeError,
SystemExit,
ManifestParseError,
):
raise raise
except Exception as e: except Exception as e:
raise ManifestParseError( raise ManifestParseError(