Changeset - 32de32f69461
[Not reviewed]
default
0 1 0
Mads Kiilerich - 11 years ago 2015-04-18 16:48:29
madski@unity3d.com
error: fix handling of errors without response

Broken by 6f9dae4d39d9.
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/error.py
Show inline comments
 
@@ -64,12 +64,15 @@ class ErrorController(BaseController):
 
            'protocol': e.get('wsgi.url_scheme'),
 
            'host': e.get('HTTP_HOST'), }
 
        if resp:
 
            c.error_message = cgi.escape(request.GET.get('code',
 
                                                         str(resp.status)))
 
            c.error_explanation = self.get_error_explanation(resp.status_int)
 
        else:
 
            c.error_message = _('No response')
 
            c.error_explanation = _('Unknown error')
 

	
 
        return render('/errors/error_document.html')
 

	
 
    def img(self, id):
 
        """Serve Pylons' stock images"""
 
        return self._serve_file(os.path.join(media_path, 'img', id))
0 comments (0 inline, 0 general)