From 1e04daa6004538f57c4c51d663b4f13daf8af2e7 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Sat, 4 Apr 2020 15:02:40 +0100 Subject: Remove --no-warn as it's unavailable on old versions (i.e. on travis) --- paper2remarkable/providers/_base.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/paper2remarkable/providers/_base.py b/paper2remarkable/providers/_base.py index 0374213..53ad78e 100644 --- a/paper2remarkable/providers/_base.py +++ b/paper2remarkable/providers/_base.py @@ -122,19 +122,14 @@ class Provider(metaclass=abc.ABCMeta): [self.pdftk_path, in_pdf, "output", out_pdf, "compress"] ) elif self.pdftool == "qpdf": - # TODO: the --no-warn option is only needed because when we remove + # TODO: the status == 3 is only needed because when we remove # the arXiv stamp we don't fix the length of the pdf object. This - # causes qpdf to raise a warning and give a nonzero exit status - # (3). Fixing the pdf object is the right approach, but this does - # work as qpdf fixes the file. + # causes qpdf to raise a warning and give a nonzero exit status. + # Fixing the pdf object is the right approach, but this does + # work as it is since qpdf fixes the file for us. status = subprocess.call( - [ - self.qpdf_path, - "--no-warn", - "--stream-data=compress", - in_pdf, - out_pdf, - ] + [self.qpdf_path, "--stream-data=compress", in_pdf, out_pdf,], + stderr=subprocess.DEVNULL, ) if not (status == 0 or status == 3): raise _CalledProcessError( -- cgit v1.2.3