1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-02 13:29:49 +00:00

parse.ast: avoid code duplication for inherit

(Bitbake rev: 0b11a3d4eab84b372fd45b9537cf0327008daf8d)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Chris Larson
2011-01-04 13:06:49 -07:00
committed by Richard Purdie
parent 74653168c0
commit 1204ed79fc
2 changed files with 6 additions and 11 deletions
+1 -5
View File
@@ -84,17 +84,13 @@ def _logged_communicate(pipe, log, input):
log.write(data)
return ''.join(outdata), ''.join(errdata)
def run(cmd, input=None, **options):
def run(cmd, input=None, log=None, **options):
"""Convenience function to run a command and return its output, raising an
exception when the command fails"""
if isinstance(cmd, basestring) and not "shell" in options:
options["shell"] = True
log = options.get('log')
if 'log' in options:
del options['log']
try:
pipe = Popen(cmd, **options)
except OSError, exc: