aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJukka Jylänki <jujjyl@gmail.com>2014-06-06 07:08:55 +0300
committerJukka Jylänki <jujjyl@gmail.com>2014-06-06 07:53:54 +0300
commit5e2b7ef2011871849917398ca6f6ba104468c200 (patch)
treefcffcb1b249c19a8b39742469b479c0913ececbe /tools
parent5652d5678fc9bda3cecd9431e77063bc90755b58 (diff)
In tools/ffdb.py, compress the zip files before uploading to improve packaged app installation times.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ffdb.py8
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: