~tieong/download-course

ef6fdf7b4d43f5cb21904c0cb9ad4694f78cc231 — Thomas Ieong 2 years ago f929d43
Moved logging into init_config
1 files changed, 2 insertions(+), 2 deletions(-)

M download_course/utils/config_json.py
M download_course/utils/config_json.py => download_course/utils/config_json.py +2 -2
@@ 1,6 1,6 @@
#!/usr/bin/python3

"""Regroup all json concernning the download of courses."""
"""Regroup all the routines pertaining the download of courses."""

import sys
import logging


@@ 31,11 31,11 @@ elif sys.platform == "darwin":
        'REPLACE_ME-courses.json'
    )

logging.info("The config file is located at %s", STORAGE_FILE)


def init_config() -> None:
    """Init the json if it doesn't exists"""
    logging.info("The config file is located at %s", STORAGE_FILE)
    if not STORAGE_FILE.exists():
        STORAGE_FILE.write_text(
            json.dumps({}, ensure_ascii=False, indent=4),