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 103168d commit c058fd0Copy full SHA for c058fd0
testcontainers/core/container.py
@@ -80,8 +80,9 @@ def __del__(self):
80
def get_container_host_ip(self) -> str:
81
# https://github.com/testcontainers/testcontainers-go/blob/dd76d1e39c654433a3d80429690d07abcec04424/docker.go#L644
82
# if os env TC_HOST is set, use it
83
- if os.environ.get('TC_HOST') is not None:
84
- return os.environ.get('TC_HOST')
+ host = os.environ.get('TC_HOST')
+ if host:
85
+ return host
86
87
# infer from docker host
88
url = self.get_docker_client().host()
0 commit comments