a little tidy

This commit is contained in:
Casper da Costa-Luis
2019-08-14 00:46:34 +01:00
parent f88c2fe5fc
commit 186f0cc483
2 changed files with 11 additions and 10 deletions
+9 -9
View File
@@ -151,16 +151,16 @@ class RemoteBASE(object):
tasks = executor.map(self.get_file_checksum, file_infos)
if len(file_infos) > LARGE_DIR_SIZE:
msg = (
"Computing md5 for a large number of files. "
"This is only done once."
logger.info(
(
"Computing md5 for a large number of files. "
"This is only done once."
)
)
logger.info(msg)
tasks = Tqdm(tasks, total=len(file_infos), unit="md5")
checksums = {
file_infos[index]: task for index, task in enumerate(tasks)
}
tasks = Tqdm(tasks, total=len(file_infos), unit="md5")
checksums = {
file_infos[index]: task for index, task in enumerate(tasks)
}
return checksums
def _collect_dir(self, path_info):
+2 -1
View File
@@ -44,7 +44,8 @@ class RemoteHTTP(RemoteBASE):
fd.flush()
pbar.update(len(chunk))
# print completed progress bar for large file sizes
if (total or pbar.n) > LARGE_FILE_SIZE:
pbar.n = total or pbar.n
if pbar.n > LARGE_FILE_SIZE:
Tqdm.write(str(pbar))
def exists(self, path_info):