Skip to content

Commit 91434f4

Browse files
committed
Replace stop/start with python-on-whales
1 parent 122d7fd commit 91434f4

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

buildrunner/docker/runner.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from docker.utils import compare_version
2424
from retry import retry
2525
import docker.errors
26+
import python_on_whales
2627
import six
2728
import timeout_decorator
2829

@@ -236,7 +237,7 @@ def start(
236237

237238
# start the container
238239
self.container = self.docker_client.create_container(self.image_name, **kwargs)
239-
self.docker_client.start(self.container["Id"])
240+
python_on_whales.docker.start(self.container["Id"])
240241

241242
# run any supplied provisioners
242243
if provisioners:
@@ -254,10 +255,7 @@ def stop(self):
254255
Stop the backing Docker container.
255256
"""
256257
if self.container:
257-
self.docker_client.stop(
258-
self.container["Id"],
259-
timeout=0,
260-
)
258+
python_on_whales.docker.stop(self.container["Id"], time=0)
261259

262260
def cleanup(self):
263261
"""

0 commit comments

Comments
 (0)