From d765f0d123fff5da0f36da8f087a8dd0da778411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9E=A5=EC=A4=80=EC=98=81?= Date: Tue, 20 Aug 2019 09:34:18 +0900 Subject: [PATCH] Group exceptions with same body together in Arbiter.run() (#2081) --- gunicorn/arbiter.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gunicorn/arbiter.py b/gunicorn/arbiter.py index 7eaa2c17..bca671d1 100644 --- a/gunicorn/arbiter.py +++ b/gunicorn/arbiter.py @@ -223,9 +223,7 @@ class Arbiter(object): self.log.info("Handling signal: %s", signame) handler() self.wakeup() - except StopIteration: - self.halt() - except KeyboardInterrupt: + except (StopIteration, KeyboardInterrupt): self.halt() except HaltServer as inst: self.halt(reason=inst.reason, exit_status=inst.exit_status)