Use formatted strings

Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
This commit is contained in:
Ayaz Salikhov
2022-02-14 14:49:16 +03:00
committed by GitHub
parent 5ebb4bd0f2
commit c89d5ac623
4 changed files with 5 additions and 4 deletions

View File

@@ -109,6 +109,7 @@ class TrackedContainer:
return logs
def get_host_port(self, container_port: str) -> str:
"""Returns the host port associated with the tracked container's port."""
assert isinstance(self.container, Container)
self.container.reload()
return self.container.attrs["NetworkSettings"]["Ports"][container_port][0][