Mercurial > code > home > repos > light9
view lib/cycloneerr.py @ 1162:487f0877b7c6
EE can now limit to showing just one song
Ignore-this: 3cad996b470fd9fc2e56524eaf13f87d
author | drewp@bigasterisk.com |
---|---|
date | Sun, 15 Jun 2014 00:33:51 +0000 |
parents | 473db8bebb8f |
children |
line wrap: on
line source
import httplib, cgi class PrettyErrorHandler(object): """ mix-in to improve cyclone.web.RequestHandler """ def get_error_html(self, status_code, **kwargs): try: tb = kwargs['exception'].getTraceback() except AttributeError: tb = "" return "<html><title>%(code)d: %(message)s</title>" \ "<body>%(code)d: %(message)s<pre>%(tb)s</pre></body></html>" % { "code": status_code, "message": httplib.responses[status_code], "tb" : cgi.escape(tb), }