(bugfix) get/import: fix broken progress bar (#4039)

PR #3672 (6d8499e) extended `LocalRemote::_get_plans` to return one
`checksums` too. As all of the args from `_get_plans` was passed
down to `download()`, it recognized extra arg of checksum as
`no_progress_bar` due to which it became True and stopped showing
progress bar at all.

Fix #3874
This commit is contained in:
Saugat Pachhai
2020-06-14 20:42:53 +03:00
committed by GitHub
parent f7348af1e0
commit bc4bf66d17
+6 -2
View File
@@ -626,8 +626,12 @@ class LocalCache(LocalRemote, CacheMixin):
func = pbar.wrap_fn(func)
with ThreadPoolExecutor(max_workers=jobs) as executor:
if download:
fails = sum(executor.map(func, *dir_plans))
fails += sum(executor.map(func, *file_plans))
from_infos, to_infos, names, _ = (
d + f for d, f in zip(dir_plans, file_plans)
)
fails = sum(
executor.map(func, from_infos, to_infos, names)
)
else:
# for uploads, push files first, and any .dir files last