File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ def get_challenge_timeout(challenge_response: ChallengeType) -> datetime.timedel
105105def is_final (exception : Exception ) -> bool :
106106 """If `is_final` returns True then we won't retry."""
107107 return (isinstance (exception , HTTPError ) and exception .response is not None and exception .response .status_code < 500
108- or stop .terminated or stop . force_quit )
108+ or stop .force_quit )
109109
110110
111111def backoff_handler (details : BackoffDetails ) -> None :
Original file line number Diff line number Diff line change @@ -88,14 +88,11 @@ def disable_restart() -> None:
8888
8989def signal_handler (signal : int , frame : FrameType | None ) -> None : # noqa: ARG001
9090 """Terminate lichess-bot."""
91- in_starting_thread = __name__ == "__main__"
9291 if not stop .terminated :
93- if in_starting_thread :
94- logger .debug ("Received SIGINT. Terminating client." )
92+ logger .debug ("Received SIGINT. Terminating client." )
9593 stop .terminated = True
9694 else :
97- if in_starting_thread :
98- logger .debug ("Received second SIGINT. Quitting now." )
95+ logger .debug ("Received second SIGINT. Quitting now." )
9996 stop .force_quit = True
10097
10198
You can’t perform that action at this time.
0 commit comments