From 233fc47b51a64ef143dbda588a1b3bcfd6d62ddc Mon Sep 17 00:00:00 2001 From: Revant Nandgaonkar Date: Sun, 1 May 2022 19:51:11 +0530 Subject: [PATCH] ci: bypass docker compose stop failure docker compose stop without starting the project results in failure. Bypass the exception for docker compose stop --- tests/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/utils.py b/tests/utils.py index ea830ed3..3d54b61b 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -46,7 +46,11 @@ class Compose: self("exec", "-T", *cmd) def stop(self) -> None: - subprocess.check_call(self.base_cmd + ("down", "-v", "--remove-orphans")) + try: + subprocess.check_call(self.base_cmd + ("down", "-v", "--remove-orphans")) + except subprocess.CalledProcessError as e: + print("docker compose stop command failed") + print(e) def bench(self, *cmd: str) -> None: self.exec("backend", "bench", *cmd)