options.update(kwargs)
subprocess.Popen.__init__(self, *args, **options)
-def run(cmd, **options):
+def run(cmd, input=None, **options):
"""Convenience function to run a command and return its output, raising an
exception when the command fails"""
raise NotFoundError(cmd)
else:
raise
- stdout, stderr = pipe.communicate()
+ stdout, stderr = pipe.communicate(input)
if pipe.returncode != 0:
raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
return stdout