From 30c9567d7cdae47ffdd2374d85d9b81ee53ec60a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D1=83=D1=87=D0=B5=D1=80=D0=B5=D0=BD=D0=BA=D0=BE=20?= =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB?= Date: Tue, 18 Jul 2023 17:24:54 +0300 Subject: [PATCH 1/2] Fix _signal_handler call by signal.signal --- bot/bot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot/bot.py b/bot/bot.py index f76610e..7506c12 100644 --- a/bot/bot.py +++ b/bot/bot.py @@ -135,7 +135,8 @@ def stop(self): self.__polling_thread.join() # noinspection PyUnusedLocal - def _signal_handler(self, sig: int): + def _signal_handler(self, sig: int, stack_frame = None): + # Bypass stack_frame due to signal handler requires 2 arguments if self.running: self.log.debug("Stopping bot by signal '{name} ({code})'. Repeat for force exit.".format( name=signal_name_by_code(sig), code=sig From c4425d48ecb2861c863d04a0171ceea7a172e660 Mon Sep 17 00:00:00 2001 From: Mikhail Kucherenko Date: Fri, 8 Aug 2025 01:14:34 +0300 Subject: [PATCH 2/2] Fix linter issue with spaces in function arguments --- bot/bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/bot.py b/bot/bot.py index 4720484..56054ee 100644 --- a/bot/bot.py +++ b/bot/bot.py @@ -146,7 +146,7 @@ def stop(self): self.__polling_thread.join() # noinspection PyUnusedLocal - def _signal_handler(self, sig: int, stack_frame = None): + def _signal_handler(self, sig: int, stack_frame=None): # Bypass stack_frame due to signal handler requires 2 arguments if self.running: self.log.debug("Stopping bot by signal '{name} ({code})'. Repeat for force exit.".format(