File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -226,15 +226,17 @@ def get_container_host_ip(self) -> str:
226226 connection_mode : ConnectionMode
227227 connection_mode = self .get_docker_client ().get_connection_mode ()
228228
229- # mypy:
230- container = self ._container
231- assert container is not None
232-
233229 if connection_mode == ConnectionMode .docker_host :
234230 return self .get_docker_client ().host ()
235231 elif connection_mode == ConnectionMode .gateway_ip :
232+ # mypy:
233+ container = self ._container
234+ assert container is not None
236235 return self .get_docker_client ().gateway_ip (container .id )
237236 elif connection_mode == ConnectionMode .bridge_ip :
237+ # mypy:
238+ container = self ._container
239+ assert container is not None
238240 return self .get_docker_client ().bridge_ip (container .id )
239241 else :
240242 # ensure that we covered all possible connection_modes
You can’t perform that action at this time.
0 commit comments