def delete_all_cached_images(options, args): """%(prog)s delete-all-cached-images [options] Remove all images from the cache. """ if not options.force and not user_confirm("Delete all cached images?", default=False): return SUCCESS client = get_client(options) num_deleted = client.delete_all_cached_images() if options.verbose: print("Deleted %(num_deleted)s cached images" % {"num_deleted": num_deleted}) return SUCCESS
def delete_all_cached_images(options, args): """%(prog)s delete-all-cached-images [options] Remove all images from the cache. """ if (not options.force and not user_confirm("Delete all cached images?", default=False)): return SUCCESS client = get_client(options) num_deleted = client.delete_all_cached_images() if options.verbose: print("Deleted %(num_deleted)s cached images" % locals()) return SUCCESS