Commit 4ebf6259 authored by Vincent Pelletier's avatar Vincent Pelletier

wsgi: Do not access sys.stderr .

parent 5662c79a
...@@ -22,7 +22,6 @@ from __future__ import absolute_import ...@@ -22,7 +22,6 @@ from __future__ import absolute_import
import httplib import httplib
import json import json
import traceback import traceback
import sys
from . import utils from . import utils
from . import exceptions from . import exceptions
...@@ -191,8 +190,8 @@ class Application(object): ...@@ -191,8 +190,8 @@ class Application(object):
except exceptions.CertificateAuthorityException, e: except exceptions.CertificateAuthorityException, e:
raise BadRequest(str(e)) raise BadRequest(str(e))
except Exception: except Exception:
print >>sys.stderr, 'Unhandled exception', environ['wsgi.errors'].write('Unhandled exception\n')
traceback.print_exc(file=sys.stderr) traceback.print_exc(file=environ['wsgi.errors'])
raise ApplicationError raise ApplicationError
except ApplicationError, e: except ApplicationError, e:
status = e.status status = e.status
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment