Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if until_found is not None and consecutive_files_found >= until_found:
logger.tqdm_write(
"Found %d consecutive previously downloaded photos. Exiting"
% until_found
)
if hasattr(photos_enumerator, "close"):
photos_enumerator.close()
break
if only_print_filenames:
exit(0)
logger.info("All photos have been downloaded!")
if auto_delete:
autodelete_photos(icloud, folder_structure, directory)