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:
226
226
connection_mode : ConnectionMode
227
227
connection_mode = self .get_docker_client ().get_connection_mode ()
228
228
229
- # mypy:
230
- container = self ._container
231
- assert container is not None
232
-
233
229
if connection_mode == ConnectionMode .docker_host :
234
230
return self .get_docker_client ().host ()
235
231
elif connection_mode == ConnectionMode .gateway_ip :
232
+ # mypy:
233
+ container = self ._container
234
+ assert container is not None
236
235
return self .get_docker_client ().gateway_ip (container .id )
237
236
elif connection_mode == ConnectionMode .bridge_ip :
237
+ # mypy:
238
+ container = self ._container
239
+ assert container is not None
238
240
return self .get_docker_client ().bridge_ip (container .id )
239
241
else :
240
242
# ensure that we covered all possible connection_modes
You can’t perform that action at this time.
0 commit comments