summaryrefslogtreecommitdiffstats
path: root/ocrloader.py
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2013-08-16 08:57:18 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2013-08-16 08:57:18 (GMT)
commita8f358bcd5ea16f32ff4232a02dc5bd813345f34 (patch)
tree9f23607acecf58d8d08488ceba21b97b9e814c69 /ocrloader.py
parent35bb78fbab82e9b85c4644196de5b85fd17be4e0 (diff)
downloadpfwbged.ocrloader-a8f358bcd5ea16f32ff4232a02dc5bd813345f34.zip
pfwbged.ocrloader-a8f358bcd5ea16f32ff4232a02dc5bd813345f34.tar.gz
pfwbged.ocrloader-a8f358bcd5ea16f32ff4232a02dc5bd813345f34.tar.bz2
fix call to OCR when not disabled
Diffstat (limited to 'ocrloader.py')
-rw-r--r--ocrloader.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ocrloader.py b/ocrloader.py
index 96dea41..3ce9ea0 100644
--- a/ocrloader.py
+++ b/ocrloader.py
@@ -22,7 +22,7 @@ def process(cfg, filename, payload, enable_ocr=True):
fd.write(payload)
fd.close()
- if not os.path.exists(ocr_filename) and not enable_ocr:
+ if not os.path.exists(ocr_filename) and enable_ocr:
fd, tmpfilename = tempfile.mkstemp(suffix='.pdf', prefix='ocrloader-')
os.write(fd, payload)
os.close(fd)