Black formatting

This commit is contained in:
allegroai 2023-12-30 23:01:19 +02:00
parent 3b53ef2708
commit cf39029cb2

View File

@ -1,8 +1,10 @@
import os
import atexit import atexit
import sys import os
import signal import signal
import sys
import six import six
from ...logger import Logger from ...logger import Logger
@ -60,11 +62,24 @@ class ExitHooks(object):
if not self._org_handlers: if not self._org_handlers:
if sys.platform == "win32": if sys.platform == "win32":
catch_signals = [signal.SIGINT, signal.SIGTERM, signal.SIGSEGV, signal.SIGABRT, catch_signals = [
signal.SIGILL, signal.SIGFPE] signal.SIGINT,
signal.SIGTERM,
signal.SIGSEGV,
signal.SIGABRT,
signal.SIGILL,
signal.SIGFPE,
]
else: else:
catch_signals = [signal.SIGINT, signal.SIGTERM, signal.SIGSEGV, signal.SIGABRT, catch_signals = [
signal.SIGILL, signal.SIGFPE, signal.SIGQUIT] signal.SIGINT,
signal.SIGTERM,
signal.SIGSEGV,
signal.SIGABRT,
signal.SIGILL,
signal.SIGFPE,
signal.SIGQUIT,
]
for c in catch_signals: for c in catch_signals:
# noinspection PyBroadException # noinspection PyBroadException
try: try: