diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-10-02 15:14:11 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-10-02 15:14:11 +0000 |
commit | 7c1f90bac429ef39ae3d1c6b4aece03e24202a96 (patch) | |
tree | cd32859e4e04bd7c3d88e5737c348108271ef937 /ick2/controllerapi.py | |
parent | 08a6fffbda07a3b456c42aa58e7f7bb52e7398a1 (diff) | |
download | ick2-7c1f90bac429ef39ae3d1c6b4aece03e24202a96.tar.gz |
Fix: handle apifw changes (raw_uri_path kwarg)
Handle it by ignoring it, until we need it.
Diffstat (limited to 'ick2/controllerapi.py')
-rw-r--r-- | ick2/controllerapi.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ick2/controllerapi.py b/ick2/controllerapi.py index af387ec..70877f1 100644 --- a/ick2/controllerapi.py +++ b/ick2/controllerapi.py @@ -65,6 +65,8 @@ class ControllerAPI: def get_callback(self, callback): # pragma: no cover def wrapper(content_type, body, **kwargs): try: + if 'raw_uri_path' in kwargs: + del kwargs['raw_uri_path'] body = callback(**kwargs) except ick2.NotFound as e: return apifw.Response({ @@ -82,7 +84,7 @@ class ControllerAPI: return wrapper def post_callback(self, callback): # pragma: no cover - def wrapper(content_type, body): + def wrapper(content_type, body, **kwargs): body = callback(body) ick2.log.log('trace', msg_text='returned body', body=repr(body)) return apifw.Response({ @@ -96,6 +98,8 @@ class ControllerAPI: def put_callback(self, callback): # pragma: no cover def wrapper(content_type, body, **kwargs): + if 'raw_uri_path' in kwargs: + del kwargs['raw_uri_path'] body = callback(body, **kwargs) ick2.log.log('trace', msg_text='returned body', body=repr(body)) return apifw.Response({ |