From 174ad9fe2290aac40b29bb84c7625f73e99d9cd2 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Sun, 13 Jun 2021 07:14:51 +0100 Subject: [PATCH] rcl ocr with tesseract: fix stupid breakage in script --- src/filters/rclocrtesseract.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/filters/rclocrtesseract.py b/src/filters/rclocrtesseract.py index b5925389..c20026b2 100755 --- a/src/filters/rclocrtesseract.py +++ b/src/filters/rclocrtesseract.py @@ -80,11 +80,12 @@ def ocrpossible(config, path): global tesseractcmd if not tesseractcmd: config.setKeyDir(os.path.dirname(path)) + tesseractcmd = config.getConfParam("tesseractcmd") if tesseractcmd: # It is very tempting to quote this value, esp. on Windows where it # will contain whitespace. There is no chance that an actual # command line would have quotes, so unquote it. - tesseractcmd = config.getConfParam("tesseractcmd").strip('"') + tesseractcmd = tesseractcmd.strip('"') else: tesseractcmd = rclexecm.which("tesseract") if not tesseractcmd: