diff --git a/zulip/integrations/jabber/jabber_mirror.py b/zulip/integrations/jabber/jabber_mirror.py index 47cab5b59..5ebb4a4bf 100755 --- a/zulip/integrations/jabber/jabber_mirror.py +++ b/zulip/integrations/jabber/jabber_mirror.py @@ -6,11 +6,12 @@ import sys import traceback from types import FrameType +from typing import Optional from zulip import RandomExponentialBackoff -def die(signal: int, frame: FrameType) -> None: +def die(signal: int, frame: Optional[FrameType]) -> None: """We actually want to exit, so run os._exit (so as not to be caught and restarted)""" os._exit(1) diff --git a/zulip/integrations/zephyr/zephyr_mirror.py b/zulip/integrations/zephyr/zephyr_mirror.py index 67f9af528..e0bd91236 100755 --- a/zulip/integrations/zephyr/zephyr_mirror.py +++ b/zulip/integrations/zephyr/zephyr_mirror.py @@ -6,16 +6,16 @@ import subprocess import sys import traceback +from types import FrameType +from typing import Optional sys.path[:0] = [os.path.dirname(__file__)] from zephyr_mirror_backend import parse_args (options, args) = parse_args() -from types import FrameType - -def die(signal: int, frame: FrameType) -> None: +def die(signal: int, frame: Optional[FrameType]) -> None: # We actually want to exit, so run os._exit (so as not to be caught and restarted) os._exit(1) diff --git a/zulip/integrations/zephyr/zephyr_mirror_backend.py b/zulip/integrations/zephyr/zephyr_mirror_backend.py index 0b27110ac..8ce1b3476 100755 --- a/zulip/integrations/zephyr/zephyr_mirror_backend.py +++ b/zulip/integrations/zephyr/zephyr_mirror_backend.py @@ -1238,7 +1238,7 @@ def parse_args() -> Tuple[optparse.Values, List[str]]: return parser.parse_args() -def die_gracefully(signal: int, frame: FrameType) -> None: +def die_gracefully(signal: int, frame: Optional[FrameType]) -> None: if CURRENT_STATE == States.ZulipToZephyr: # this is a child process, so we want os._exit (no clean-up necessary) os._exit(1)