def _pull_assemble_error_status(status, ret, logs):
    comment = 'An error occurred pulling your image'
    out = ''
    try:
        out = '\n' + ret
        for err_log in logs:
            if isinstance(err_log, dict):
                if 'errorDetail' in err_log:
                    if 'code' in err_log['errorDetail']:
                        msg = '\n{0}\n{1}: {2}'.format(
                            err_log['error'],
                            err_log['errorDetail']['code'],
                            err_log['errorDetail']['message']
                        )
                    else:
                        msg = '\n{0}\n{1}'.format(
                            err_log['error'],
                            err_log['errorDetail']['message'],
                        )
                    comment += msg
    except Exception:
        out = traceback.format_exc()
    _invalid(status, out=out, comment=comment)
    return status
Get a template string from a tx app.
dataset/ETHPy150Open saltstack/salt/salt/modules/dockerio.py/_pull_assemble_error_status--crossover with--dataset/ETHPy150Open rvanlaar/easy-transifex/src/transifex/transifex/addons/txapps/views.py/get_from_app