diff --git a/lib/invoice/cli.py b/lib/invoice/cli.py index 572d195..aebe59e 100644 --- a/lib/invoice/cli.py +++ b/lib/invoice/cli.py @@ -206,8 +206,9 @@ class Application: assert(os.path.exists(tex_file)) log.debug("Creating PDF invoice...") - if subprocess.call((self.tex_program, "{0}.tex".format(invoice._name)), cwd=tmp_path) != 0: - raise GenerationError("PDF generation failed.") + with open(os.devnull, 'w') as FNULL: + if subprocess.call((self.tex_program, "{0}.tex".format(invoice._name)), cwd=tmp_path, stdout=FNULL) != 0: + raise GenerationError("PDF generation failed.") assert(os.path.exists(tmp_pdf_file)) log.debug("Moving PDF file to the output directory...")