diff options
| author | Chris Denton <christophersdenton@gmail.com> | 2022-01-05 17:55:52 +0000 |
|---|---|---|
| committer | Chris Denton <christophersdenton@gmail.com> | 2022-01-05 17:59:13 +0000 |
| commit | 014f22abaf2ff2e08a4f03540756068426a63f49 (patch) | |
| tree | f072888205c99be9f2bfb79f0f60e3e3b39acd8f /src | |
| parent | 181e91567c9f347e055b33b1d7e9894f769aafe3 (diff) | |
| download | rust-014f22abaf2ff2e08a4f03540756068426a63f49.tar.gz rust-014f22abaf2ff2e08a4f03540756068426a63f49.zip | |
Break the loop
A missing break statement lead to an infinite loop in bootstrap.py.
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/bootstrap.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 5235a6b8180..7c36bb264c4 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -13,7 +13,7 @@ import sys 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 @@ -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") |
