Fix signal teardown outside main thread (#11124)

This commit is contained in:
Adrian Wälchli 2021-12-17 14:12:02 +01:00 committed by GitHub
parent 5956a0716b
commit 6582249a0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ class SignalConnector:
"""Restores the signals that were previsouly configured before :class:`SignalConnector` replaced them."""
for signum, handler in self._original_handlers.items():
if handler is not None:
signal.signal(signum, handler) # type: ignore[arg-type]
self._register_signal(signum, handler)
self._original_handlers = {}
@staticmethod