mirror of
https://github.com/clearml/clearml
synced 2025-02-07 05:18:50 +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):
|
||||
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 = {}
|
||||
|
||||
def remove_exception_hooks(self):
|
||||
|
Loading…
Reference in New Issue
Block a user