[api] refactoring: CONFIG_PATH constant renamed to CONFIG_DIR

This commit is contained in:
Vinicius Moreira
2021-11-24 12:11:41 -03:00
parent 797bea4b6d
commit 47348c4b6c
8 changed files with 18 additions and 18 deletions

View File

@@ -7,13 +7,13 @@ from typing import Optional
import yaml
from bauh.api.paths import CONFIG_PATH
from bauh.api.paths import CONFIG_DIR
from bauh.commons import util
def read_config(file_path: str, template: dict, update_file: bool = False, update_async: bool = False) -> dict:
if not os.path.exists(file_path):
Path(CONFIG_PATH).mkdir(parents=True, exist_ok=True)
Path(CONFIG_DIR).mkdir(parents=True, exist_ok=True)
save_config(template, file_path)
else:
with open(file_path) as f: