Skip to content

Commit a23f2cd

Browse files
author
Roman
committed
fix except
1 parent 5022a5f commit a23f2cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/e2e_tests/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,15 @@ def try_start_docker():
140140
"""Run docker based on OS."""
141141
try:
142142
subprocess.run(["open", "-a", "Docker"], check=True) # macOS
143-
except FileNotFoundError:
143+
except (FileNotFoundError, subprocess.CalledProcessError):
144144
try:
145145
subprocess.run(["systemctl", "start", "docker"], check=True) # Linux
146-
except FileNotFoundError:
146+
except (FileNotFoundError, subprocess.CalledProcessError):
147147
try:
148148
subprocess.run(
149149
["sudo", "service", "docker", "start"], check=True
150150
) # Linux alternative
151-
except FileNotFoundError:
151+
except (FileNotFoundError, subprocess.CalledProcessError):
152152
print("Failed to start Docker. Manual start may be required.")
153153
return False
154154

0 commit comments

Comments
 (0)