From eaaaf902be83962082e7bf3d03c5b62381b246e7 Mon Sep 17 00:00:00 2001 From: Max Fischer Date: Fri, 5 Jul 2024 15:41:28 +0200 Subject: [PATCH] ignore KI in programmatic and CLI usage --- uvicorn/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/uvicorn/main.py b/uvicorn/main.py index 41e9ec84e..6fab04b5f 100644 --- a/uvicorn/main.py +++ b/uvicorn/main.py @@ -575,6 +575,8 @@ def run( Multiprocess(config, target=server.run, sockets=[sock]).run() else: server.run() + except KeyboardInterrupt: + pass finally: if config.uds and os.path.exists(config.uds): os.remove(config.uds) # pragma: py-win32