From c5033d0186f4195fc0153d81f662a9cd068cd338 Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Wed, 15 Aug 2018 10:46:56 -0700 Subject: [PATCH] Specify unit divisor for tqdm Previously, Zappa formatted in both SI and binary: Uploading githubwatch-dev-1534354789.zip (14.8MiB).. 100%|###########################| 15.5M/15.5M [00:03<00:00, 4.54MiB/s] --- zappa/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zappa/core.py b/zappa/core.py index 2fdb556b6..2788efcda 100644 --- a/zappa/core.py +++ b/zappa/core.py @@ -937,7 +937,7 @@ def upload_to_s3(self, source_path, bucket_name, disable_progress=False): try: source_size = os.stat(source_path).st_size print("Uploading {0} ({1})..".format(dest_path, human_size(source_size))) - progress = tqdm(total=float(os.path.getsize(source_path)), unit_scale=True, unit='B', disable=disable_progress) + progress = tqdm(total=float(os.path.getsize(source_path)), unit_scale=True, unit_divisor=1024, unit='iB', disable=disable_progress) # Attempt to upload to S3 using the S3 meta client with the progress bar. # If we're unable to do that, try one more time using a session client,