equal
deleted
inserted
replaced
636 def run(cmd, wd, options, replacements): |
636 def run(cmd, wd, options, replacements): |
637 """Run command in a sub-process, capturing the output (stdout and stderr). |
637 """Run command in a sub-process, capturing the output (stdout and stderr). |
638 Return a tuple (exitcode, output). output is None in debug mode.""" |
638 Return a tuple (exitcode, output). output is None in debug mode.""" |
639 # TODO: Use subprocess.Popen if we're running on Python 2.4 |
639 # TODO: Use subprocess.Popen if we're running on Python 2.4 |
640 if options.debug: |
640 if options.debug: |
641 proc = subprocess.Popen(cmd, shell=True) |
641 proc = subprocess.Popen(cmd, shell=True, cwd=wd) |
642 ret = proc.wait() |
642 ret = proc.wait() |
643 return (ret, None) |
643 return (ret, None) |
644 |
644 |
645 proc = Popen4(cmd, wd, options.timeout) |
645 proc = Popen4(cmd, wd, options.timeout) |
646 def cleanup(): |
646 def cleanup(): |