mirror of
https://github.com/vale981/two_qubit_model
synced 2025-03-06 02:01:40 -05:00
do not touch db path prematurely
This commit is contained in:
parent
c4bc0b4571
commit
8e2f6e764f
1 changed files with 1 additions and 2 deletions
|
@ -37,9 +37,8 @@ def model_db(data_path: str = "./.data"):
|
|||
db_path = path / "model_data.json"
|
||||
db_lock = path / "model_data.json.lock"
|
||||
|
||||
db_path.touch(exist_ok=True)
|
||||
|
||||
with FileLock(db_lock):
|
||||
db_path.touch(exist_ok=True)
|
||||
with db_path.open("r+") as f:
|
||||
data = f.read()
|
||||
db = (
|
||||
|
|
Loading…
Add table
Reference in a new issue