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: