Commit ef958a5e authored by José Henrique's avatar José Henrique
Browse files

Always throw container exceptions

parent 9651a0df
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
import docker import docker
import os import os
import traceback
import threading import threading
import time import time
...@@ -73,7 +72,6 @@ def start_build(environment_vars): ...@@ -73,7 +72,6 @@ def start_build(environment_vars):
kill_container(container_name) kill_container(container_name)
pull_image(image_name) pull_image(image_name)
print("Starting container: " + container_name) print("Starting container: " + container_name)
try:
stream_container_logs(container_name) stream_container_logs(container_name)
docker_client.containers.run(image_name, docker_client.containers.run(image_name,
remove=True, remove=True,
...@@ -81,8 +79,3 @@ def start_build(environment_vars): ...@@ -81,8 +79,3 @@ def start_build(environment_vars):
volumes=volumes_to_mount, volumes=volumes_to_mount,
environment=environment_vars) environment=environment_vars)
return True return True
except docker.errors.ContainerError:
return False
except Exception:
traceback.print_exc()
return False
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment