print error message with linebreaks

This commit is contained in:
Bela 2018-05-07 16:26:36 +02:00
parent febb2414a7
commit 7e3d88afd3

View file

@ -41,7 +41,7 @@ def fillpdfform(fields, pdf, pdfout, fdf):
exitcode = pdfcreation.wait(timeout=5)
if exitcode != 0: # todo: remove magical number
_, errortext = pdfcreation.communicate()
errortext = str(errortext)
errortext = errortext.decode()
raise cmd.CalledProcessError(returncode=exitcode,
cmd=pdfcreation,
output="pdftk fillform reported an error."