Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit 6b68df9

Browse files
authored
Merge pull request #3 from vmarkovtsev/fix-launch
Check the container's status in ensure_bblfsh_is_running()
2 parents 32bba9f + 3d33d33 commit 6b68df9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bblfsh/launcher.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
def ensure_bblfsh_is_running():
99
client = docker.from_env(version="auto")
1010
try:
11-
client.containers.get("bblfsh")
11+
container = client.containers.get("bblfsh")
12+
if container.status != "running":
13+
raise docker.errors.NotFound()
1214
return True
1315
except docker.errors.NotFound:
1416
container = client.containers.run(

0 commit comments

Comments
 (0)