def _build_failed(dst, name):
    try:
        __context__['retcode'] = salt.defaults.exitcodes.SALT_BUILD_FAIL
        shutil.rmtree(dst)
    except __HOLE__ as exc:
        if exc.errno != errno.ENOENT:
            raise CommandExecutionError(
                'Unable to cleanup container root dir {0}'.format(dst)
            )
    raise CommandExecutionError(
        'Container {0} failed to build'.format(name)
    )
dataset/ETHPy150Open saltstack/salt/salt/modules/nspawn.py/_build_failed