INNER CODE UNIT · Python
autobuild
secondlife/viewer · scripts/packages-formatter.py:47
def autobuild(*args):
"""
Launch autobuild with specified command-line arguments.
Return its stdout pipe from which the caller can read.
"""
# subprocess wants a list, not a tuple
command = [_autobuild] + list(args)
try:
child = subprocess.Popen(command,
stdin=None, stdout=subprocess.PIPE,
universal_newlines=True, env=_autobuild_env)
except OSError as err:
if err.errno != errno.ENOENT:
# Don't attempt to interpret anything but ENOENT
raise
# Here it's ENOENT: subprocess can't find the autobuild executable.
sys.exit("packages-formatter on %s: can't run autobuild:\n%s\n%s" % \
(sys.platform, ' '.join(command), err))