ocr: compat: make a non-existant ocrprogs config variable equivalent to "tesseract"

This commit is contained in:
Jean-Francois Dockes
2020-02-28 14:38:02 +01:00
parent 0fa0c273ab
commit fe86fa9e1f
2 changed files with 12 additions and 5 deletions
+5 -1
View File
@@ -81,9 +81,13 @@ if incache:
# Retrieve configured OCR program names and try to load the
# corresponding module
ocrprogs = config.getConfParam("ocrprogs")
if ocrprogs is None:
# Compat: the previous version has no ocrprogs variable, but would do
# tesseract by default. Use "ocrprogs = " for a really empty list
ocrprogs = "tesseract"
if not ocrprogs:
_deb("No ocrprogs variable in recoll configuration")
sys.exit(1)
sys.exit(0)
#_deb("ocrprogs: %s" % ocrprogs)