Break the loop
A missing break statement lead to an infinite loop in bootstrap.py.
This commit is contained in:
parent
181e91567c
commit
014f22abaf
1 changed files with 3 additions and 1 deletions
|
@ -13,7 +13,7 @@ import sys
|
||||||
import tarfile
|
import tarfile
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
from time import time
|
from time import time, sleep
|
||||||
|
|
||||||
# Acquire a lock on the build directory to make sure that
|
# Acquire a lock on the build directory to make sure that
|
||||||
# we don't cause a race condition while building
|
# we don't cause a race condition while building
|
||||||
|
@ -42,8 +42,10 @@ def acquire_lock(build_dir):
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
curs.execute("BEGIN EXCLUSIVE")
|
curs.execute("BEGIN EXCLUSIVE")
|
||||||
|
break
|
||||||
except sqlite3.OperationalError:
|
except sqlite3.OperationalError:
|
||||||
pass
|
pass
|
||||||
|
sleep(0.25)
|
||||||
return curs
|
return curs
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print("warning: sqlite3 not available in python, skipping build directory lock")
|
print("warning: sqlite3 not available in python, skipping build directory lock")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue