Fix lint errors
All checks were successful
Lint Checks / Run linter (pull_request) Successful in 35s
Smoke Test / Run basic test suite (pull_request) Successful in 4m4s
Deploy Test / Run deploy test suite (pull_request) Successful in 4m52s
Webapp Test / Run webapp test suite (pull_request) Successful in 4m32s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 7m13s

This commit is contained in:
David Boreham 2024-07-14 23:17:18 -06:00
parent 1374028d17
commit 0c6d4e3c4e

View File

@ -115,7 +115,7 @@ def _insert_persistent_peers(config_dir: Path, new_persistent_peers: str):
sys.exit(1)
with open(config_file_path, "r") as input_file:
config_file_content = input_file.read()
persistent_peers_pattern = '^persistent_peers = ""'
persistent_peers_pattern = r'^persistent_peers = ""'
replace_with = f"persistent_peers = \"{new_persistent_peers}\""
config_file_content = re.sub(persistent_peers_pattern, replace_with, config_file_content, flags=re.MULTILINE)
with open(config_file_path, "w") as output_file:
@ -129,7 +129,7 @@ def _enable_cors(config_dir: Path):
sys.exit(1)
with open(config_file_path, "r") as input_file:
config_file_content = input_file.read()
cors_pattern = '^cors_allowed_origins = \[]'
cors_pattern = r'^cors_allowed_origins = \[]'
replace_with = 'cors_allowed_origins = ["*"]'
config_file_content = re.sub(cors_pattern, replace_with, config_file_content, flags=re.MULTILINE)
with open(config_file_path, "w") as output_file:
@ -140,7 +140,7 @@ def _enable_cors(config_dir: Path):
sys.exit(1)
with open(app_file_path, "r") as input_file:
app_file_content = input_file.read()
cors_pattern = '^enabled-unsafe-cors = false'
cors_pattern = r'^enabled-unsafe-cors = false'
replace_with = "enabled-unsafe-cors = true"
app_file_content = re.sub(cors_pattern, replace_with, app_file_content, flags=re.MULTILINE)
with open(app_file_path, "w") as output_file: