summaryrefslogtreecommitdiff
path: root/pecan/rest.py
diff options
context:
space:
mode:
authorYoann Roman <yoann@shootq.com>2011-03-08 13:37:36 -0500
committerYoann Roman <yoann@shootq.com>2011-03-08 13:37:36 -0500
commitbbb0a04114e0f721812d98dea4568ec80679d1c1 (patch)
tree5756c5700e562eb2735478f123dc8c95ce51e8a4 /pecan/rest.py
parentfac57e3c85185fc34ce6aff2335281e61077cf08 (diff)
parent8232b0f412b096c9cdae536449bc4c223e37a5f8 (diff)
downloadpecan-bbb0a04114e0f721812d98dea4568ec80679d1c1.tar.gz
Merging pecan-env into master
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 d8a5003..fc03b6c 100644
--- a/pecan/rest.py
+++ b/pecan/rest.py
@@ -57,7 +57,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
@@ -166,7 +166,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)