diff options
author | mattack108 <matt.lenc@gmail.com> | 2013-09-20 11:39:46 +0100 |
---|---|---|
committer | mattack108 <matt.lenc@gmail.com> | 2013-09-20 11:39:46 +0100 |
commit | 45eab831e2ad1f3f73560527ed5f618bfb62177f (patch) | |
tree | ff58a6f035e3412f81a7fb98cfb159cd9d5bf14a /wkhtmltopdf/utils.py | |
parent | 9c5d3def72cafdcfd85784c53836421943e83277 (diff) | |
download | django-wkhtmltopdf-45eab831e2ad1f3f73560527ed5f618bfb62177f.tar.gz django-wkhtmltopdf-45eab831e2ad1f3f73560527ed5f618bfb62177f.tar.bz2 django-wkhtmltopdf-45eab831e2ad1f3f73560527ed5f618bfb62177f.zip |
Fix tests for Travis by obtaining the WKHTMLTOPDF_CMD from env vars.
Diffstat (limited to 'wkhtmltopdf/utils.py')
-rw-r--r-- | wkhtmltopdf/utils.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/wkhtmltopdf/utils.py b/wkhtmltopdf/utils.py index be6bc6a..1b74a97 100644 --- a/wkhtmltopdf/utils.py +++ b/wkhtmltopdf/utils.py @@ -1,7 +1,6 @@ from __future__ import absolute_import from copy import copy -from functools import wraps from itertools import chain import os import re @@ -80,7 +79,9 @@ def wkhtmltopdf(pages, output=None, **kwargs): if env is not None: env = dict(os.environ, **env) - cmd = getattr(settings, 'WKHTMLTOPDF_CMD', 'wkhtmltopdf') + cmd = 'WKHTMLTOPDF_CMD' + cmd = getattr(settings, cmd, os.environ.get(cmd, 'wkhtmltopdf')) + ck_args = list(chain(cmd.split(), _options_to_args(**options), list(pages), |