diff --git a/custom_functions/prechecks/config_file_checks.py b/custom_functions/prechecks/config_file_checks.py index a3f8c39..94952b6 100644 --- a/custom_functions/prechecks/config_file_checks.py +++ b/custom_functions/prechecks/config_file_checks.py @@ -1,11 +1,13 @@ +"""Module to check for the config file.""" + import os def check_for_config_file(): - if os.path.exists(f"{os.getcwd()}/configs/config.yaml"): + """Check for the config file.""" + if os.path.exists(os.path.join(os.getcwd(), "configs", "config.yaml")): return - else: - default_config = """\ + default_config = """ default_wv_cdm: '' default_pr_cdm: '' secret_key_flask: 'secretkey' @@ -22,6 +24,8 @@ remote_cdm_secret: '' # port: '' # database: '' """ - with open(f"{os.getcwd()}/configs/config.yaml", "w") as f: + with open( + os.path.join(os.getcwd(), "configs", "config.yaml"), "w", encoding="utf-8" + ) as f: f.write(default_config) return