aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--wkhtmltopdf/utils.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/wkhtmltopdf/utils.py b/wkhtmltopdf/utils.py
index aab4152..ce32621 100644
--- a/wkhtmltopdf/utils.py
+++ b/wkhtmltopdf/utils.py
@@ -11,8 +11,6 @@ from django.utils.encoding import smart_str
from .subprocess import check_output
-WKHTMLTOPDF_CMD = getattr(settings, 'WKHTMLTOPDF_CMD', 'wkhtmltopdf')
-
def _options_to_args(**options):
"""Converts ``options`` into a string of command-line arguments."""
@@ -63,7 +61,8 @@ def wkhtmltopdf(pages, output=None, **kwargs):
}
options.update(kwargs)
- args = list(chain([WKHTMLTOPDF_CMD],
+ cmd = getattr(settings, 'WKHTMLTOPDF_CMD', 'wkhtmltopdf')
+ args = list(chain([cmd],
_options_to_args(**options),
list(pages),
[output]))