Skip to content

Commit

Permalink
Fixed broken archive
Browse files Browse the repository at this point in the history
  • Loading branch information
jakev committed Nov 8, 2015
1 parent cb6b19a commit 099f280
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/dtf/core/cmds/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@

from dtf.module import Module

import subprocess
import os
from subprocess import Popen

class archive(Module):

Expand All @@ -44,12 +45,15 @@ def make_zip(cls, zip_name):

"""Make a ZIP file"""

cmd = "zip -r %s ./*" % zip_name
null_f = open(os.devnull, 'w')
cmd = ['zip', '-r', zip_name, '.']

proc = subprocess.Popen(cmd, shell=True,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
proc = Popen(cmd, stdout=null_f, stderr=null_f, shell=False)

return proc.wait()
proc.wait()
null_f.close()

return proc.returncode

def do_create(self, args):

Expand Down

0 comments on commit 099f280

Please sign in to comment.