Reverted logging style

This commit is contained in:
Joel Collins 2020-11-12 15:45:58 +00:00
parent e25c23cf1c
commit 6fb61e1e3f
24 changed files with 100 additions and 106 deletions

View file

@ -86,7 +86,7 @@ def load_json_file(config_path) -> dict:
"""
config_path = os.path.expanduser(config_path)
logging.info("Loading {}...", config_path)
logging.info("Loading %s...", config_path)
with open(config_path) as config_file:
try:
@ -109,7 +109,7 @@ def save_json_file(config_path: str, config_dict: dict):
"""
config_path = os.path.expanduser(config_path)
logging.info("Saving {}...", config_path)
logging.info("Saving %s...", config_path)
logging.debug(config_dict)
with open(config_path, "w") as outfile:
@ -142,14 +142,14 @@ def initialise_file(config_path, populate: str = "{}\n"):
"""
config_path = os.path.expanduser(config_path)
logging.debug("Initialising {}", (config_path))
logging.debug("Exists: {}", (os.path.exists(config_path)))
logging.debug("Initialising %s", (config_path))
logging.debug("Exists: %s", (os.path.exists(config_path)))
if not os.path.exists(config_path): # If user config file doesn't exist
logging.warning("No config file found at {}. Creating...", (config_path))
logging.warning("No config file found at %s. Creating...", (config_path))
create_file(config_path)
logging.info("Populating {}...", (config_path))
logging.info("Populating %s...", (config_path))
with open(config_path, "w") as outfile:
outfile.write(populate)