def inc_xattr(path, key, n=1):
    count = int(get_xattr(path, key))
    count += n
    set_xattr(path, key, str(count))
Increment the value of an xattr (assuming it is an integer).
dataset/ETHPy150Open rcbops/glance-buildpackage/glance/image_cache/drivers/xattr.py/inc_xattr