Merge pull request #419 from ddddavidmartin/let_unpaper_overwrite_temp_files

Let unpaper overwrite temporary files.
This commit is contained in:
Daniel Quinn 2018-10-08 09:32:30 +00:00 committed by GitHub
commit fbb389553c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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