Mercurial > repos > peterjc > mira4_assembler
comparison tools/mira4_0/mira4_convert.py @ 34:0785a6537f3e draft
planemo upload for repository https://github.com/peterjc/galaxy_mira/tree/master/tools/mira4_0 commit 6405ba93fcec7ea93452bf54d559c7507ee7a57c
author | peterjc |
---|---|
date | Wed, 07 Jun 2017 12:33:39 -0400 |
parents | 56b421d59805 |
children | 259891fce7fd |
comparison
equal
deleted
inserted
replaced
33:1291ed21789f | 34:0785a6537f3e |
---|---|
27 | 27 |
28 def run(cmd): | 28 def run(cmd): |
29 # Avoid using shell=True when we call subprocess to ensure if the Python | 29 # Avoid using shell=True when we call subprocess to ensure if the Python |
30 # script is killed, so too is the child process. | 30 # script is killed, so too is the child process. |
31 try: | 31 try: |
32 child = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) | 32 child = subprocess.Popen(cmd, universal_newlines=True, |
33 stdout=subprocess.PIPE, stderr=subprocess.PIPE) | |
33 except Exception as err: | 34 except Exception as err: |
34 sys.exit("Error invoking command:\n%s\n\n%s\n" % (" ".join(cmd), err)) | 35 sys.exit("Error invoking command:\n%s\n\n%s\n" % (" ".join(cmd), err)) |
35 # Use .communicate as can get deadlocks with .wait(), | 36 # Use .communicate as can get deadlocks with .wait(), |
36 stdout, stderr = child.communicate() | 37 stdout, stderr = child.communicate() |
37 return_code = child.returncode | 38 return_code = child.returncode |