From 2ceab47920b770fd18e577cbe6f7b1536cc5be81 Mon Sep 17 00:00:00 2001 From: "Julien M." Date: Thu, 28 Dec 2023 12:46:21 +0100 Subject: [PATCH] feature: add file size to downloaded file --- qgis_deployment_toolbelt/utils/file_downloader.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qgis_deployment_toolbelt/utils/file_downloader.py b/qgis_deployment_toolbelt/utils/file_downloader.py index fc5cbb0b..cec531ff 100644 --- a/qgis_deployment_toolbelt/utils/file_downloader.py +++ b/qgis_deployment_toolbelt/utils/file_downloader.py @@ -15,6 +15,7 @@ # package from qgis_deployment_toolbelt.__about__ import __title_clean__, __version__ +from qgis_deployment_toolbelt.utils.formatters import convert_octets from qgis_deployment_toolbelt.utils.proxies import get_proxy_settings # ############################################################################ @@ -80,7 +81,8 @@ def download_remote_file_to_local( if chunk: buffile.write(chunk) logger.info( - f"Downloading {remote_url_to_download} to {local_file_path} succeeded." + f"Downloading {remote_url_to_download} to {local_file_path} " + f"({convert_octets(local_file_path.stat().st_size)}) succeeded." ) except HTTPError as error: logger.error(