Skip to content

Commit

Permalink
Rollup merge of #92589 - ChrisDenton:break-loop, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
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
  • Loading branch information
matthiaskrgr committed Jan 5, 2022
2 parents 7f7b3b6 + 014f22a commit cc59087
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import tarfile
import tempfile

from time import time
from time import time, sleep

# Acquire a lock on the build directory to make sure that
# we don't cause a race condition while building
Expand Down Expand Up @@ -42,8 +42,10 @@ def acquire_lock(build_dir):
while True:
try:
curs.execute("BEGIN EXCLUSIVE")
break
except sqlite3.OperationalError:
pass
sleep(0.25)
return curs
except ImportError:
print("warning: sqlite3 not available in python, skipping build directory lock")
Expand Down

0 comments on commit cc59087

Please sign in to comment.