def get_xattr(path, key, **kwargs):
    """Return the value for a particular xattr

    If the key doesn't not exist, or xattrs aren't supported by the file
    system then a KeyError will be raised, that is, unless you specify a
    default using kwargs.
    """
    namespaced_key = _make_namespaced_xattr_key(key)
    entry_xattr = xattr.xattr(path)
    try:
        return entry_xattr[namespaced_key]
    except __HOLE__:
        if 'default' in kwargs:
            return kwargs['default']
        else:
            raise
dataset/ETHPy150Open rcbops/glance-buildpackage/glance/image_cache/drivers/xattr.py/get_xattr