From ac62432a2d676030d4342c9a93be292e9be1889c Mon Sep 17 00:00:00 2001 From: Gerdagithub Date: Mon, 15 Apr 2024 21:22:33 +0300 Subject: [PATCH 1/2] logging a message when folder is created --- data_collection/collection.py | 1 + 1 file changed, 1 insertion(+) diff --git a/data_collection/collection.py b/data_collection/collection.py index 24e40fd..d788758 100644 --- a/data_collection/collection.py +++ b/data_collection/collection.py @@ -45,6 +45,7 @@ def get_file_from_url(url, save_to, override=False): directory = os.path.dirname(save_to) if not os.path.exists(directory): os.makedirs(directory) + logging.info(f"Created directory: {directory}") # check if file exist and needs to override if os.path.exists(save_to) and not override: From b8ae13ae893a0e99232b279fbce7189ecbb54ddd Mon Sep 17 00:00:00 2001 From: Gerdagithub Date: Mon, 15 Apr 2024 21:30:29 +0300 Subject: [PATCH 2/2] fixed formatting --- data_collection/collection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data_collection/collection.py b/data_collection/collection.py index d788758..6bb9cd1 100644 --- a/data_collection/collection.py +++ b/data_collection/collection.py @@ -45,7 +45,7 @@ def get_file_from_url(url, save_to, override=False): directory = os.path.dirname(save_to) if not os.path.exists(directory): os.makedirs(directory) - logging.info(f"Created directory: {directory}") + logging.info("Created directory: %s", directory) # check if file exist and needs to override if os.path.exists(save_to) and not override: