[Kimchi-devel] [PATCH] GET /plugins failed, fix it
Shu Ming
shuming at linux.vnet.ibm.com
Mon Jan 27 15:43:06 UTC 2014
NACK
See comments below.
2014/1/27 23:14, shaohef at linux.vnet.ibm.com:
> From: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
>
> commit 478d01d add a more parameter "filter_params" for get method of collection.
>
> But it does not add this new parameter to derived class.
>
> $ curl -H "Content-Type: application/json" -H "Accept: application/json" \
> http://localhost:8000/plugins
>
> Error as follow:
>
> [27/Jan/2014:23:01:50] HTTP Traceback (most recent call last):
> File "/usr/lib/python2.7/site-packages/cherrypy/_cprequest.py", line
> 656, in respond
> response.body = self.handler()
> File "/usr/lib/python2.7/site-packages/cherrypy/lib/encoding.py", line
> 188, in __call__
> self.body = self.oldhandler(*args, **kwargs)
> File "/usr/lib/python2.7/site-packages/cherrypy/_cpdispatch.py", line
> 34, in __call__
> return self.callable(*self.args, **self.kwargs)
> File "/home/shhfeng/work/workdir/kimchi/src/kimchi/control/base.py",
> line 266, in index
> return self.get(filter_params)
> TypeError: get() takes exactly 1 argument (2 given)
>
> Signed-off-by: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
> ---
> src/kimchi/control/plugins.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/kimchi/control/plugins.py b/src/kimchi/control/plugins.py
> index 5938085..1221342 100644
> --- a/src/kimchi/control/plugins.py
> +++ b/src/kimchi/control/plugins.py
> @@ -37,7 +37,7 @@ class Plugins(Collection):
> def data(self):
> return self.info
>
> - def get(self):
> + def get(self, *args):
> res_list = []
> try:
> get_list = getattr(self.model, model_fn(self, 'get_list'))
I am not sure how *args will be used in get().
More information about the Kimchi-devel
mailing list