From 651885209fd8fc2d12a3bb88793e4627ca178d64 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Thu, 3 Jan 2013 22:38:59 -0800 Subject: [PATCH] Toolbar: replace pylons.Response usage with simple abort. --- r2/r2/controllers/toolbar.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/r2/r2/controllers/toolbar.py b/r2/r2/controllers/toolbar.py index 36035f5ca..02cf9afd2 100644 --- a/r2/r2/controllers/toolbar.py +++ b/r2/r2/controllers/toolbar.py @@ -30,7 +30,7 @@ from r2.lib.memoize import memoize from r2.lib.template_helpers import add_sr from r2.lib import utils from r2.lib.validator import * -from pylons import c, Response +from pylons import c from r2.models.admintools import is_shamed_domain import string @@ -174,11 +174,8 @@ class ToolbarController(RedditController): # we don't want clients to think that this URL is actually a # valid URL for search-indexing or the like - c.response = Response() - c.response.status_code = 404 request.environ['usable_error_content'] = spaceCompress(res.render()) - - return c.response + abort(404) @validate(link = VLink('id')) def GET_comments(self, link):