mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-06-05 12:35:38 +00:00
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:
parent
a94457d1ce
commit
c061593a12
@ -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(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user