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

@@ -16,7 +16,7 @@ from apps.cli.blob import Blob
from common.logger import Logger
from common.appointment import Appointment
from common.cryptographer import Cryptographer
from common.tools import check_sha256_hex_format, check_locator_format, compute_locator, setup_data_folder
from common.tools import check_sha256_hex_format, check_locator_format, compute_locator
HTTP_OK = 200
@@ -343,9 +343,6 @@ if __name__ == "__main__":
commands = ["add_appointment", "get_appointment", "help"]
testing_commands = ["generate_dummy_appointment"]
# Create user folder if missing
setup_data_folder(config.get("DATA_FOLDER"), logger)
try:
opts, args = getopt(argv[1:], "s:p:h", ["server", "port", "help"])