Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
Merge pull request #419 from ddddavidmartin/let_unpaper_overwrite_tem…
Browse files Browse the repository at this point in the history
…p_files

Let unpaper overwrite temporary files.
  • Loading branch information
danielquinn authored Oct 8, 2018
2 parents 2ef2bf8 + f948ee1 commit fbb3895
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/paperless_tesseract/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ def run_convert(*args):

def run_unpaper(args):
unpaper, pnm = args
command_args = unpaper, pnm, pnm.replace(".pnm", ".unpaper.pnm")
command_args = (unpaper, "--overwrite", pnm,
pnm.replace(".pnm", ".unpaper.pnm"))
if not subprocess.Popen(command_args).wait() == 0:
raise ParseError("Unpaper failed at {}".format(command_args))

Expand Down

0 comments on commit fbb3895

Please sign in to comment.