aboutsummaryrefslogtreecommitdiffstats
path: root/wkhtmltopdf/views.py
diff options
context:
space:
mode:
authorMatt Lenc <mattl@incuna.com>2014-06-18 17:11:38 +0100
committerMatt Lenc <mattl@incuna.com>2014-06-18 17:11:38 +0100
commitc66222e8d649ef3d10ca679921c4c6ce8793cddd (patch)
treeaab3532baab2bf88a2f3c6921b2692de276d989a /wkhtmltopdf/views.py
parentb615855f8ca277437dad9c332398e3803c2af41c (diff)
downloaddjango-wkhtmltopdf-c66222e8d649ef3d10ca679921c4c6ce8793cddd.tar.gz
django-wkhtmltopdf-c66222e8d649ef3d10ca679921c4c6ce8793cddd.tar.bz2
django-wkhtmltopdf-c66222e8d649ef3d10ca679921c4c6ce8793cddd.zip
First try py3k then fall back to python2
Diffstat (limited to 'wkhtmltopdf/views.py')
-rw-r--r--wkhtmltopdf/views.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/wkhtmltopdf/views.py b/wkhtmltopdf/views.py
index 92e2d0f..1c57869 100644
--- a/wkhtmltopdf/views.py
+++ b/wkhtmltopdf/views.py
@@ -77,12 +77,12 @@ class PDFTemplateResponse(TemplateResponse, PDFResponse):
content = make_absolute_paths(content)
try:
- tempfile = NamedTemporaryFile(mode=mode, bufsize=bufsize,
+ # Python3 has 'buffering' arg instead of 'bufsize'
+ tempfile = NamedTemporaryFile(mode=mode, buffering=bufsize,
suffix=suffix, prefix=prefix,
dir=dir, delete=delete)
except TypeError:
- # Python 3 has 'buffering' arg for 'NamedTemporaryFile' class
- tempfile = NamedTemporaryFile(mode=mode, buffering=bufsize,
+ tempfile = NamedTemporaryFile(mode=mode, bufsize=bufsize,
suffix=suffix, prefix=prefix,
dir=dir, delete=delete)