Skip to content

Commit 014f22a

Browse files
committed
Break the loop
A missing break statement lead to an infinite loop in bootstrap.py.
1 parent 181e915 commit 014f22a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/bootstrap/bootstrap.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import tarfile
1414
import tempfile
1515

16-
from time import time
16+
from time import time, sleep
1717

1818
# Acquire a lock on the build directory to make sure that
1919
# we don't cause a race condition while building
@@ -42,8 +42,10 @@ def acquire_lock(build_dir):
4242
while True:
4343
try:
4444
curs.execute("BEGIN EXCLUSIVE")
45+
break
4546
except sqlite3.OperationalError:
4647
pass
48+
sleep(0.25)
4749
return curs
4850
except ImportError:
4951
print("warning: sqlite3 not available in python, skipping build directory lock")

0 commit comments

Comments
 (0)