From c061593a12b39f0333ead979c478abfa33fa420c Mon Sep 17 00:00:00 2001 From: Erik Elmeke Date: Mon, 21 Apr 2025 08:04:27 +0200 Subject: 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 Reviewed-by: Josip Sokcevic Tested-by: Erik Elmeke --- manifest_xml.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'manifest_xml.py') 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 ) # should isolate this to the exact exception, but that's # tricky. actual parsing implementation may vary. - except ( - KeyboardInterrupt, - RuntimeError, - SystemExit, - ManifestParseError, - ): + except (RuntimeError, ManifestParseError): raise except Exception as e: raise ManifestParseError( -- cgit v1.2.3-54-g00ecf