Skip to content

Commit c061593

Browse files
author
Erik Elmeke
committed
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 <[email protected]> Reviewed-by: Josip Sokcevic <[email protected]> Tested-by: Erik Elmeke <[email protected]>
1 parent a94457d commit c061593

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

manifest_xml.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -1328,12 +1328,7 @@ def _ParseManifestXml(
13281328
)
13291329
# should isolate this to the exact exception, but that's
13301330
# tricky. actual parsing implementation may vary.
1331-
except (
1332-
KeyboardInterrupt,
1333-
RuntimeError,
1334-
SystemExit,
1335-
ManifestParseError,
1336-
):
1331+
except (RuntimeError, ManifestParseError):
13371332
raise
13381333
except Exception as e:
13391334
raise ManifestParseError(

0 commit comments

Comments
 (0)