Mercurial > code > home > repos > homeauto
annotate lib/cycloneerr/cycloneerr.py @ 1562:c2ed44ed1e3c dependabot/pip/service/collector/twisted-19.7.0
Bump twisted from 19.2.0 to 19.7.0 in /service/collector
Bumps [twisted](https://github.com/twisted/twisted) from 19.2.0 to 19.7.0.
- [Release notes](https://github.com/twisted/twisted/releases)
- [Changelog](https://github.com/twisted/twisted/blob/trunk/NEWS.rst)
- [Commits](https://github.com/twisted/twisted/compare/twisted-19.2.0...twisted-19.7.0)
Signed-off-by: dependabot[bot] <support@github.com>
author | dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
---|---|
date | Fri, 14 Feb 2020 10:01:26 +0000 |
parents | c5bd44f90ced |
children | fd94061db75c |
rev | line source |
---|---|
1315 | 1 try: |
2 import http.client as httplib | |
3 except ImportError: | |
4 import httplib # type: ignore | |
5 import cgi | |
6 | |
7 class PrettyErrorHandler(object): | |
8 """ | |
9 mix-in to improve cyclone.web.RequestHandler | |
10 """ | |
11 def get_error_html(self, status_code, **kwargs): | |
12 try: | |
13 tb = kwargs['exception'].getTraceback() | |
14 except AttributeError: | |
15 tb = "" | |
16 return "<html><title>%(code)d: %(message)s</title>" \ | |
17 "<body>%(code)d: %(message)s<pre>%(tb)s</pre></body></html>" % { | |
18 "code": status_code, | |
19 "message": httplib.responses[status_code], | |
20 "tb" : cgi.escape(tb), | |
21 } |