Skip to content

Commit

Permalink
Make the extension argument optional
Browse files Browse the repository at this point in the history
So it can be possible to omit it in cases, where it's not needed.
In general It will help with #141
  • Loading branch information
int3l committed Jul 28, 2019
1 parent 2827247 commit 55579e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pytesseract.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def run_tesseract(input_filename,
if config:
cmd_args += shlex.split(config)

if extension not in {'box', 'osd', 'tsv'}:
if extension and extension not in {'box', 'osd', 'tsv'}:
cmd_args.append(extension)

try:
Expand All @@ -226,7 +226,7 @@ def run_tesseract(input_filename,


def run_and_get_output(image,
extension,
extension='',
lang=None,
config='',
nice=0,
Expand Down

0 comments on commit 55579e7

Please sign in to comment.