aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Peterson <max@incuna.com>2015-12-01 14:36:53 +0000
committerMax Peterson <max@incuna.com>2015-12-01 14:36:53 +0000
commitb2454fead29992336bdec05cec54657788b432ec (patch)
tree8224f9d9c7b569146929d8ad1a09680287d352a5
parent1a849e356d1c2487337c62768f16ea80883c9bf1 (diff)
parent09eaeef0ae73bbc57b2faebb7c402e4dec45e0e3 (diff)
downloaddjango-wkhtmltopdf-b2454fead29992336bdec05cec54657788b432ec.tar.gz
django-wkhtmltopdf-b2454fead29992336bdec05cec54657788b432ec.tar.bz2
django-wkhtmltopdf-b2454fead29992336bdec05cec54657788b432ec.zip
Merge pull request #97 from powderflask/master
Add catch IOError for fileno() call
-rw-r--r--wkhtmltopdf/utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/wkhtmltopdf/utils.py b/wkhtmltopdf/utils.py
index f9d7ac1..b5df681 100644
--- a/wkhtmltopdf/utils.py
+++ b/wkhtmltopdf/utils.py
@@ -94,10 +94,11 @@ def wkhtmltopdf(pages, output=None, **kwargs):
list(pages),
[output]))
ck_kwargs = {'env': env}
+ # Handling of fileno() attr. based on https://github.com/GrahamDumpleton/mod_wsgi/issues/85
try:
i = sys.stderr.fileno()
ck_kwargs['stderr'] = sys.stderr
- except AttributeError:
+ except (AttributeError, IOError):
# can't call fileno() on mod_wsgi stderr object
pass