handle no USR1 signal available on platform

This commit is contained in:
norohind 2022-04-21 18:56:29 +03:00
parent 20cd603b23
commit 5027ef748c
Signed by: norohind
GPG Key ID: 01C3BECC26FB59E1

View File

@ -158,7 +158,11 @@ def main():
global can_be_shutdown
signal.signal(signal.SIGTERM, shutdown_callback)
signal.signal(signal.SIGINT, shutdown_callback)
signal.signal(signal.SIGUSR1, threads_dump)
try:
signal.signal(signal.SIGUSR1, threads_dump)
except AttributeError:
pass
def help_cli() -> str:
return """Possible arguments: