def log_output(prefix, args):
    process = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
    for line in iter(process.stdout.readline, ''):
        log('{}{} {}{}'.format(CYAN_COLOR, prefix, NO_COLOR, line.rstrip()))
    process.stdout.close()
    exit_code = process.wait()
    if exit_code:
        fatal('Execution failed with code: {}'.format(exit_code))
def log_output(prefix, args):
    process = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
    for line in iter(process.stdout.readline, ):
        log('{}{} {}{}'.format(CYAN_COLOR, prefix, NO_COLOR, line.rstrip()))
    process.stdout.close()
    exit_code = process.wait()
    if exit_code:
        fatal('Execution failed with code: {}'.format(exit_code))