Exemple #1
0
def delete_all_queued_images(options, args):
    """%(prog)s delete-all-queued-images [options]

Remove all images from the cache queue.
    """
    if not options.force and not user_confirm("Delete all queued images?", default=False):
        return SUCCESS

    client = get_client(options)
    num_deleted = client.delete_all_queued_images()

    if options.verbose:
        print("Deleted %(num_deleted)s queued images" % {"num_deleted": num_deleted})

    return SUCCESS
Exemple #2
0
def delete_all_queued_images(options, args):
    """%(prog)s delete-all-queued-images [options]

Remove all images from the cache queue.
    """
    if (not options.force
            and not user_confirm("Delete all queued images?", default=False)):
        return SUCCESS

    client = get_client(options)
    num_deleted = client.delete_all_queued_images()

    if options.verbose:
        print("Deleted %(num_deleted)s queued images" % locals())

    return SUCCESS