Skip to content

Commit f8a1054

Browse files
committed
Merge pull request zerovm#38 from mgeisler/uncompress-upload
deploy: uncompress zar when uploading
2 parents 55b24d0 + cc8bca9 commit f8a1054

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

zpmlib/commands.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import json
1717
import operator
1818
import tarfile
19+
import gzip
1920
import shlex
2021
import argparse
2122
try:
@@ -162,7 +163,7 @@ def deploy(args):
162163
client.auth()
163164

164165
path = '%s/%s' % (args.target, os.path.basename(args.zar))
165-
client.upload(path, open(args.zar).read())
166+
client.upload(path, gzip.open(args.zar).read())
166167

167168
swift_path = urlparse.urlparse(client._swift_url).path
168169
if swift_path.startswith('/v1/'):

0 commit comments

Comments
 (0)