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

Call DownloadStats.finish() when done

Previously we relied on DownloadStats.report() to do it, but we don't
guarantee that will happen anymore. And really, when
Downloader.update_cache or Downloader.download_for_time finish, it's
done and should be marked as such.
parent 6b79e643
No related branches found
No related tags found
No related merge requests found
......@@ -960,6 +960,7 @@ class Downloader:
retries = 1
stats = DownloadStatistics(progress=progress)
self.download_first_available(filesets, dst, timeout=timeout, retries=retries, retry_wait=retry_wait, do_download = do_download, download_stats = stats)
stats.finish()
return stats
......@@ -1005,6 +1006,7 @@ class Downloader:
# We just keep trucking on; missed files are unfortunate,
# but not much we can do.
pass
download_stats.finish()
return download_stats
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment