Mercurial > code > home > repos > homeauto
view lib/cycloneerr/cycloneerr.py @ 653:281be4651a2f
graph path now has 'store' in it
Ignore-this: f20acfa66fa56e5b4e076e76cad140f6
author | drewp@bigasterisk.com |
---|---|
date | Wed, 25 Sep 2019 17:29:47 -0700 |
parents | 11e090ba2731 |
children | 71e8ab109f5a |
line wrap: on
line source
try: import http.client as httplib except ImportError: import httplib # type: ignore import 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), }