fix call to OCR when not disabled

This commit is contained in:
Frédéric Péters 2013-08-16 10:57:18 +02:00
parent 35bb78fbab
commit a8f358bcd5
1 changed files with 1 additions and 1 deletions

View File

@ -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)