Skip to content

Commit 0c9cf9a

Browse files
authored
Rollup merge of #92589 - ChrisDenton:break-loop, r=Mark-Simulacrum
Break the loop A missing break statement lead to an infinite loop in bootstrap.py. I also added a short sleep so it's not constantly running at 100%. But I can remove that if it's not wanted. Fixes #76661
2 parents 1591dcb + 014f22a commit 0c9cf9a

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)