diff options
author | Jukka Jylänki <jujjyl@gmail.com> | 2014-06-06 07:08:55 +0300 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2014-06-06 07:53:54 +0300 |
commit | 5e2b7ef2011871849917398ca6f6ba104468c200 (patch) | |
tree | fcffcb1b249c19a8b39742469b479c0913ececbe /tools | |
parent | 5652d5678fc9bda3cecd9431e77063bc90755b58 (diff) |
In tools/ffdb.py, compress the zip files before uploading to improve packaged app installation times.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/ffdb.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/ffdb.py b/tools/ffdb.py index c22fd9db..9c2709c3 100755 --- a/tools/ffdb.py +++ b/tools/ffdb.py @@ -18,7 +18,13 @@ def sizeof_fmt(num): return "%3.1f%s" % (num, 'TB') def zipdir(path, zipfilename): - zipf = zipfile.ZipFile(zipfilename, 'w') + try: + import zlib + zip_mode = zipfile.ZIP_DEFLATED + except: + zip_mode = zipfile.ZIP_STORED + + zipf = zipfile.ZipFile(zipfilename, 'w', zip_mode) files_to_compress = [] for root, dirs, files in os.walk(path): for file in files: |