diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2020-04-04 15:11:14 +0100 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2020-04-04 15:11:14 +0100 |
| commit | d8d73a7f57cc4cd87fad8902d5f721d07dac8934 (patch) | |
| tree | 33cfd43b30f9cacf047886b87396c89d63ed7d82 | |
| parent | Merge branch 'qpdfSwitch' of https://github.com/delaere/paper2remarkable into... (diff) | |
| parent | Remove --no-warn as it's unavailable on old versions (diff) | |
| download | paper2remarkable-d8d73a7f57cc4cd87fad8902d5f721d07dac8934.tar.gz paper2remarkable-d8d73a7f57cc4cd87fad8902d5f721d07dac8934.zip | |
Merge branch 'qpdfSwitch' of https://github.com/delaere/paper2remarkable into delaere-qpdfSwitch
| -rw-r--r-- | paper2remarkable/providers/_base.py | 17 |
1 files 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( |
