From 5b43aaac61ac94abe722bc98ae58468618f2f512 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 5 Jun 2024 06:45:14 +0200 Subject: Adding upstream version 3.0.46. Signed-off-by: Daniel Baumann --- src/prompt_toolkit/application/application.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/prompt_toolkit/application/application.py') diff --git a/src/prompt_toolkit/application/application.py b/src/prompt_toolkit/application/application.py index d463781..d93c243 100644 --- a/src/prompt_toolkit/application/application.py +++ b/src/prompt_toolkit/application/application.py @@ -1621,5 +1621,6 @@ def _restore_sigint_from_ctypes() -> Generator[None, None, None]: try: yield finally: - signal.signal(signal.SIGINT, sigint) + if sigint is not None: + signal.signal(signal.SIGINT, sigint) pythonapi.PyOS_setsig(signal.SIGINT, sigint_os) -- cgit v1.2.3