##// END OF EJS Templates
gists: handle 500 error on sending unsupported format
dan -
r3538:e456c2e1 default
parent child Browse files
Show More
@@ -25,7 +25,7 b' import formencode'
25 25 import formencode.htmlfill
26 26 import peppercorn
27 27
28 from pyramid.httpexceptions import HTTPNotFound, HTTPFound
28 from pyramid.httpexceptions import HTTPNotFound, HTTPFound, HTTPBadRequest
29 29 from pyramid.view import view_config
30 30 from pyramid.renderers import render
31 31 from pyramid.response import Response
@@ -295,6 +295,8 b' class GistView(BaseAppView):'
295 295 response = Response(content)
296 296 response.content_type = 'text/plain'
297 297 return response
298 elif return_format:
299 raise HTTPBadRequest()
298 300
299 301 return self._get_template_context(c)
300 302
General Comments 0
You need to be logged in to leave comments. Login now