summaryrefslogtreecommitdiff
path: root/pecan/rest.py
diff options
context:
space:
mode:
authorYoann Roman <yoann@shootq.com>2011-03-06 11:37:05 -0500
committerYoann Roman <yoann@shootq.com>2011-03-06 11:37:05 -0500
commit10496f77cce1b04f97ca5c3806f899a371fb9e52 (patch)
tree3728aa8158afa460763a46b265f0b56b0944d4b3 /pecan/rest.py
parent91095e1d608a7526356e8b3481ffa6d1bc20c684 (diff)
downloadpecan-10496f77cce1b04f97ca5c3806f899a371fb9e52.tar.gz
Moving all Pecan request properties into a Pecan config object to keep WebOb's Request object cleaner
Diffstat (limited to 'pecan/rest.py')
-rw-r--r--pecan/rest.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/pecan/rest.py b/pecan/rest.py
index 88eed0a..ef87bfb 100644
--- a/pecan/rest.py
+++ b/pecan/rest.py
@@ -52,7 +52,7 @@ class RestController(object):
# get the args to figure out how much to chop off
args = getargspec(getattr(self, method))
- fixed_args = len(args[0][1:]) - len(getattr(request, 'routing_args', []))
+ fixed_args = len(args[0][1:]) - len(request.pecan.get('routing_args', []))
var_args = args[1]
# attempt to locate a sub-controller
@@ -161,7 +161,4 @@ class RestController(object):
_handle_put = _handle_post
def _set_routing_args(self, args):
- if hasattr(request, 'routing_args'):
- request.routing_args.extend(args)
- else:
- setattr(request, 'routing_args', args)
+ request.pecan.setdefault('routing_args', []).extend(args)