Handle the case of empty tesseract dirs during download

This commit is contained in:
Alex Pyrgiotis 2025-04-02 12:14:35 +03:00
parent 33b2a183ce
commit 843e68cdf7
No known key found for this signature in database
GPG key ID: B6C15EBA0357C9AA

View file

@ -51,6 +51,8 @@ def main():
if files == expected_files:
logger.info("Skipping tessdata download, language data already exists")
return
elif not files:
logger.info("Tesseract dir is empty, proceeding to download language data")
else:
logger.info(f"Found {tessdata_dir} but contents do not match")
return 1