def delete_if_lifetime_over(item, name):
    """
    :return: True if file was deleted
    """
    if 0 < item.meta['timestamp-max-life'] < time.time():
        try:
            current_app.storage.remove(name)
        except (OSError, __HOLE__) as e:
            pass
        return True
    return False
dataset/ETHPy150Open bepasty/bepasty-server/bepasty/utils/date_funcs.py/delete_if_lifetime_over