diff options
author | Yoann Roman <yoann@shootq.com> | 2011-03-08 13:37:36 -0500 |
---|---|---|
committer | Yoann Roman <yoann@shootq.com> | 2011-03-08 13:37:36 -0500 |
commit | bbb0a04114e0f721812d98dea4568ec80679d1c1 (patch) | |
tree | 5756c5700e562eb2735478f123dc8c95ce51e8a4 /pecan/rest.py | |
parent | fac57e3c85185fc34ce6aff2335281e61077cf08 (diff) | |
parent | 8232b0f412b096c9cdae536449bc4c223e37a5f8 (diff) | |
download | pecan-bbb0a04114e0f721812d98dea4568ec80679d1c1.tar.gz |
Merging pecan-env into master
Diffstat (limited to 'pecan/rest.py')
-rw-r--r-- | pecan/rest.py | 7 |
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) |