Commit 9d5449d2 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Make Container.started wait for Container.is_running to return True

parent ac516eea
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ from .proc import Environ
from .proc import Executor
from .proc import MutableArguments
from .proc import exec_io
from .utils import wait

LOCALHOST = ipaddress.IPv4Address(0x7f000001)

@@ -281,6 +282,7 @@ class Container(Item):
		"""
		with self:
			self.start()
			wait(lambda: self.is_running(raise_on_exit=True))
			yield self

	def is_running(self, raise_on_exit: bool = False) -> bool: