We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8f3841 commit 2aad950Copy full SHA for 2aad950
comm/base_comm.py
@@ -5,6 +5,7 @@
5
# Distributed under the terms of the Modified BSD License.
6
from __future__ import annotations
7
8
+import contextlib
9
import logging
10
import typing as t
11
import uuid
@@ -81,7 +82,10 @@ def publish_msg(
81
82
83
def __del__(self) -> None:
84
"""trigger close on gc"""
- self.close(deleting=True)
85
+ with contextlib.suppress(Exception):
86
+ # any number of things can have gone horribly wrong
87
+ # when called during interpreter teardown
88
+ self.close(deleting=True)
89
90
# publishing messages
91
0 commit comments