mirror of
https://github.com/clearml/clearml
synced 2025-02-11 23:33:21 +00:00
Protect signal unregistering
This commit is contained in:
parent
a81ef3f922
commit
3b53ef2708
@ -75,7 +75,11 @@ class ExitHooks(object):
|
|||||||
|
|
||||||
def remove_signal_hooks(self):
|
def remove_signal_hooks(self):
|
||||||
for org_handler_k, org_handler_v in self._org_handlers.items():
|
for org_handler_k, org_handler_v in self._org_handlers.items():
|
||||||
signal.signal(org_handler_k, org_handler_v)
|
# noinspection PyBroadException
|
||||||
|
try:
|
||||||
|
signal.signal(org_handler_k, org_handler_v)
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
self._org_handlers = {}
|
self._org_handlers = {}
|
||||||
|
|
||||||
def remove_exception_hooks(self):
|
def remove_exception_hooks(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user