Skip to content
Snippets Groups Projects
Commit ef1e7ca6 authored by Alan De Smet's avatar Alan De Smet
Browse files

Add DownloadStatistics.__str__

Provides a summary of itself
parent 0deb19d6
No related branches found
No related tags found
No related merge requests found
......@@ -105,6 +105,14 @@ class DownloadStatistics:
self.deleted_files = 0
self.deleted_size = 0
def __str__(self):
return (f"Downloaded {self.downloaded_files} files "
f"totalling {self.downloaded_size} bytes. "
f"Pulled {self.cache_hits} files from cache, "
f"saving {self.cache_size} bytes of download. "
f"Deleted {self.deleted_files} files, "
f"freeing {self.deleted_size} bytes of space. "
)
def download_successful(state, dst, size, download_stats):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment