diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2020-04-04 15:02:40 +0100 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2020-04-04 15:02:40 +0100 |
| commit | 1e04daa6004538f57c4c51d663b4f13daf8af2e7 (patch) | |
| tree | dbab9920f309934398cd209d492362b1c5450c2c | |
| parent | Code formatting (diff) | |
| download | paper2remarkable-1e04daa6004538f57c4c51d663b4f13daf8af2e7.tar.gz paper2remarkable-1e04daa6004538f57c4c51d663b4f13daf8af2e7.zip | |
Remove --no-warn as it's unavailable on old versions
(i.e. on travis)
| -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( |
