From 6d115cbf30c40bb97aae3f6166c9f679abdcc102 Mon Sep 17 00:00:00 2001 From: Ouziel Slama Date: Sun, 15 Dec 2024 17:22:28 +0000 Subject: [PATCH] fix testnet test book --- counterparty-core/counterpartycore/server.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/counterparty-core/counterpartycore/server.py b/counterparty-core/counterpartycore/server.py index 235d245d99..087c3358f3 100755 --- a/counterparty-core/counterpartycore/server.py +++ b/counterparty-core/counterpartycore/server.py @@ -1042,10 +1042,13 @@ def bootstrap_progress(blocknum, blocksize, totalsize): tar_file.extractall(path=config.DATA_DIR) # nosec B202 # noqa: S202 assert os.path.exists(ledger_database_path) - assert os.path.exists(api_database_path) + assert os.path.exists(api_database_path) or os.path.exists(old_api_database_path) # user and group have "rw" access os.chmod(ledger_database_path, 0o660) # nosec B103 - os.chmod(api_database_path, 0o660) # nosec B103 + if os.path.exists(api_database_path): + os.chmod(api_database_path, 0o660) # nosec B103 + if os.path.exists(old_api_database_path): + os.chmod(old_api_database_path, 0o660) # nosec B103 with log.Spinner("Cleaning up..."): os.remove(tarball_path)