equal
deleted
inserted
replaced
498 status = ex.status |
498 status = ex.status |
499 if req.status_out < 400: |
499 if req.status_out < 400: |
500 # don't overwrite it if it's already set |
500 # don't overwrite it if it's already set |
501 req.status_out = status |
501 req.status_out = status |
502 json_dumper = getattr(ex, 'dumps', lambda : json.dumps({'reason': text_type(ex)})) |
502 json_dumper = getattr(ex, 'dumps', lambda : json.dumps({'reason': text_type(ex)})) |
503 return json_dumper() |
503 return json_dumper().encode('utf-8') |
504 |
504 |
505 # special case handling |
505 # special case handling |
506 |
506 |
507 def need_login_content(self, req): |
507 def need_login_content(self, req): |
508 return self.vreg['views'].main_template(req, 'login') |
508 return self.vreg['views'].main_template(req, 'login') |