equal
deleted
inserted
replaced
749 def run(cmd, wd, options, replacements): |
749 def run(cmd, wd, options, replacements): |
750 """Run command in a sub-process, capturing the output (stdout and stderr). |
750 """Run command in a sub-process, capturing the output (stdout and stderr). |
751 Return a tuple (exitcode, output). output is None in debug mode.""" |
751 Return a tuple (exitcode, output). output is None in debug mode.""" |
752 # TODO: Use subprocess.Popen if we're running on Python 2.4 |
752 # TODO: Use subprocess.Popen if we're running on Python 2.4 |
753 if options.debug: |
753 if options.debug: |
754 proc = subprocess.Popen(cmd, shell=True, cwd=wd, stdin=subprocess.PIPE) |
754 proc = subprocess.Popen(cmd, shell=True, cwd=wd) |
755 proc.stdin.close() |
|
756 ret = proc.wait() |
755 ret = proc.wait() |
757 return (ret, None) |
756 return (ret, None) |
758 |
757 |
759 proc = Popen4(cmd, wd, options.timeout) |
758 proc = Popen4(cmd, wd, options.timeout) |
760 def cleanup(): |
759 def cleanup(): |