Avoid python stack traces when hitting ^C in autoupdate (#6004)

Currently hitting ^C prints out two stack traces, requiring scrolling up
though multiple screens of scrollback to get back to the autoupdate
results. This primarily shows up when hitting ^C while it's symbolizing
a C++ stack trace.
This commit is contained in:
Dana Jansens
2025-09-08 21:17:36 +00:00
committed by GitHub
parent b92e23962a
commit 1dbf000905
2 changed files with 9 additions and 2 deletions
+5 -1
View File
@@ -14,6 +14,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
import argparse
import subprocess
import sys
import time
import scripts_utils
@@ -82,4 +83,7 @@ def main() -> None:
if __name__ == "__main__":
main()
try:
main()
except KeyboardInterrupt:
sys.exit(1)
+4 -1
View File
@@ -96,4 +96,7 @@ def main() -> None:
if __name__ == "__main__":
main()
try:
main()
except KeyboardInterrupt:
sys.exit(1)