aboutsummaryrefslogtreecommitdiffstats
path: root/wkhtmltopdf/utils.py
diff options
context:
space:
mode:
authorJames Turnbull <james@incuna.com>2015-07-31 16:42:59 +0100
committerJames Turnbull <james@incuna.com>2015-07-31 16:42:59 +0100
commitc98062dcfea8c51eaca96a69facb49268bf7aaa4 (patch)
tree93d4152cffe63692cf8f5738683347f7c70b8603 /wkhtmltopdf/utils.py
parentd24325f4a9ba19733ecfbb83d19f4553b9e3fb38 (diff)
parent797b909847a950fa8617461824af1602323c2985 (diff)
downloaddjango-wkhtmltopdf-c98062dcfea8c51eaca96a69facb49268bf7aaa4.tar.gz
django-wkhtmltopdf-c98062dcfea8c51eaca96a69facb49268bf7aaa4.tar.bz2
django-wkhtmltopdf-c98062dcfea8c51eaca96a69facb49268bf7aaa4.zip
Merge pull request #83 from DeadWisdom/master
WKHTMLTOPDF_CMD needs to be properly split by the shlex module
Diffstat (limited to 'wkhtmltopdf/utils.py')
-rw-r--r--wkhtmltopdf/utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/wkhtmltopdf/utils.py b/wkhtmltopdf/utils.py
index 603d29a..40e1809 100644
--- a/wkhtmltopdf/utils.py
+++ b/wkhtmltopdf/utils.py
@@ -5,6 +5,7 @@ from itertools import chain
import os
import re
import sys
+import shlex
try:
from urllib.request import pathname2url
@@ -88,7 +89,7 @@ def wkhtmltopdf(pages, output=None, **kwargs):
cmd = 'WKHTMLTOPDF_CMD'
cmd = getattr(settings, cmd, os.environ.get(cmd, 'wkhtmltopdf'))
- ck_args = list(chain(cmd.split(),
+ ck_args = list(chain(shlex.split(cmd),
_options_to_args(**options),
list(pages),
[output]))