Ignore errors when cleaning up docker container in linux.py

This commit is contained in:
Yannick Jadoul
2020-06-02 15:09:41 +02:00
parent ecbdc2e3d3
commit a0dab888a7
+4 -1
View File
@@ -279,7 +279,10 @@ def build(options: BuildOptions) -> None:
exit(1)
finally:
# Still gets executed, even when 'exit(1)' gets called
call(['docker', 'rm', '--force', '-v', container_name])
try:
call(['docker', 'rm', '--force', '-v', container_name])
except subprocess.CalledProcessError:
pass
def troubleshoot(package_dir: str, error: Exception) -> None: