From dc3a733f04fa5e970dd1ebd9f5864aa88d34088c Mon Sep 17 00:00:00 2001 From: Unrud Date: Sun, 19 Dec 2021 12:58:35 +0100 Subject: [PATCH] Change type of stack_frame to Optional[...] --- radicale/__main__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/radicale/__main__.py b/radicale/__main__.py index 885be73e..b03e12ae 100644 --- a/radicale/__main__.py +++ b/radicale/__main__.py @@ -30,7 +30,7 @@ import signal import socket import sys from types import FrameType -from typing import List, cast +from typing import List, Optional, cast from radicale import VERSION, config, log, server, storage, types from radicale.log import logger @@ -49,7 +49,7 @@ def run() -> None: # (like destructors, try-finish etc.), otherwise the process exits # without running any of them def exit_signal_handler(signal_number: int, - stack_frame: FrameType) -> None: + stack_frame: Optional[FrameType]) -> None: sys.exit(1) for signal_number in exit_signal_numbers: signal.signal(signal_number, exit_signal_handler) @@ -188,7 +188,7 @@ def run() -> None: # Shutdown server when signal arrives def shutdown_signal_handler(signal_number: int, - stack_frame: FrameType) -> None: + stack_frame: Optional[FrameType]) -> None: shutdown_socket.close() for signal_number in exit_signal_numbers: signal.signal(signal_number, shutdown_signal_handler)