mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
check that OCR_LANGUAGE has also been set
This commit is contained in:
parent
463ff97b97
commit
23e30ae40a
1 changed files with 2 additions and 2 deletions
|
@ -334,7 +334,7 @@ class DangerzoneConverter:
|
||||||
with open(height_filename) as f:
|
with open(height_filename) as f:
|
||||||
height = f.read().strip()
|
height = f.read().strip()
|
||||||
|
|
||||||
if os.environ.get("OCR") == "1":
|
if os.environ.get("OCR") == "1" and os.environ.get("OCR_LANGUAGE"):
|
||||||
# OCR the document
|
# OCR the document
|
||||||
self.output(
|
self.output(
|
||||||
False,
|
False,
|
||||||
|
@ -379,7 +379,7 @@ class DangerzoneConverter:
|
||||||
png_filename,
|
png_filename,
|
||||||
ocr_filename,
|
ocr_filename,
|
||||||
"-l",
|
"-l",
|
||||||
os.environ.get("OCR_LANGUAGE"),
|
os.environ.get("OCR_LANGUAGE"), # type: ignore
|
||||||
"--dpi",
|
"--dpi",
|
||||||
"70",
|
"70",
|
||||||
"pdf",
|
"pdf",
|
||||||
|
|
Loading…
Reference in a new issue