From 6fb95a958f11bbc7b3a50bdb7cd3bc0569adb830 Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Mon, 22 Aug 2011 02:51:36 -0400 Subject: [PATCH] pecan.abort now proxies keyword arguments through to webob.exc implementations. --- pecan/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pecan/core.py b/pecan/core.py index 1271a21..5eaac9f 100644 --- a/pecan/core.py +++ b/pecan/core.py @@ -55,7 +55,7 @@ def override_template(template, content_type=None): request.pecan['override_content_type'] = content_type -def abort(status_code=None, detail='', headers=None, comment=None): +def abort(status_code=None, detail='', headers=None, comment=None, **kw): ''' Raise an HTTP status code, as specified. Useful for returning status codes like 401 Unauthorized or 403 Forbidden. @@ -66,7 +66,7 @@ def abort(status_code=None, detail='', headers=None, comment=None): :param comment: A comment to include in the response. ''' - raise exc.status_map[status_code](detail=detail, headers=headers, comment=comment) + raise exc.status_map[status_code](detail=detail, headers=headers, comment=comment, **kw) def redirect(location, internal=False, code=None, headers={}):