Skip to content

Commit ba8f8ca

Browse files
linting
1 parent 5b6ee33 commit ba8f8ca

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

core/testcontainers/core/network.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111
# License for the specific language governing permissions and limitations
1212
# under the License.
1313
import uuid
14+
from contextlib import suppress
1415
from typing import Optional
1516

1617
from testcontainers.core.docker_client import DockerClient
1718

1819

19-
class Network(object):
20+
class Network:
2021
"""
2122
Network context manager for programmatically connecting containers.
2223
"""
@@ -42,7 +43,5 @@ def __exit__(self, exc_type, exc_val, exc_tb) -> None:
4243

4344
def __del__(self) -> None:
4445
if self._network is not None:
45-
try:
46+
with suppress(Exception):
4647
self.remove()
47-
except: # noqa: E722
48-
pass

0 commit comments

Comments
 (0)