From cb31140d3a7f44738fa1851890706dc7b2f1085e Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 26 Oct 2013 17:42:12 +0800 Subject: [PATCH] Do "compress" the archive when creating zip. By default the zipfile module doesn't do the compression unless we explictly specify the method. --- script/lib/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/lib/util.py b/script/lib/util.py index af714686..7c890bf8 100644 --- a/script/lib/util.py +++ b/script/lib/util.py @@ -70,7 +70,7 @@ def make_zip(zip_file_path, files, dirs): files += dirs subprocess.check_call(['zip', '-r', '-y', zip_file_path] + files) else: - zip_file = zipfile.ZipFile(zip_file_path, "w") + zip_file = zipfile.ZipFile(zip_file_path, "w", zipfile.ZIP_DEFLATED) for filename in files: zip_file.write(filename, filename) for dirname in dirs: -- 2.43.0