From bf920c1b963a4d1891b51126818a110db265b286 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Thu, 30 Nov 2023 08:04:28 +0000 Subject: [PATCH] Bug 1866760 - Do not handle SystemExit and KeyboardInterrupt as generic exceptions during error handling r=ahochheiden,glandium Differential Revision: https://phabricator.services.mozilla.com/D194749 --- mach | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mach b/mach index 938ac54fcba8..b5a6ef1a94f9 100755 --- a/mach +++ b/mach @@ -157,7 +157,9 @@ def main(args): print("Could not run mach: No mach source directory found.") sys.exit(1) sys.exit(mach.run(args)) - except: + except (KeyboardInterrupt, SystemExit): + raise + except Exception as e: if sys.version_info >= ( MAX_PYTHON_VERSION_TO_CONSIDER[0], MAX_PYTHON_VERSION_TO_CONSIDER[1] + 1,