Removes Logger dependency from setup_data_folder

Logger was only used to log when a new folder was created, and was making that the setup needed to be done on the main of pisad and cli instead of __init__, which seems a better fit
This commit is contained in:
Sergi Delgado Segura
2020-01-23 19:32:40 +01:00
parent dce7b4d39e
commit 5c75b1f40d
5 changed files with 6 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
import os
import apps.cli.conf as conf
from common.tools import extend_paths, check_conf_fields, setup_logging
from common.tools import extend_paths, check_conf_fields, setup_logging, setup_data_folder
LOG_PREFIX = "cli"
@@ -24,4 +24,5 @@ conf_fields = extend_paths(conf_fields["DATA_FOLDER"]["value"], conf_fields)
# Sanity check fields and build config dictionary
config = check_conf_fields(conf_fields)
setup_data_folder(config.get("DATA_FOLDER"))
setup_logging(config.get("CLIENT_LOG_FILE"), LOG_PREFIX)