summaryrefslogtreecommitdiff
path: root/pecan/rest.py
diff options
context:
space:
mode:
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)