From 6fdbce89e4da968098d31d18357891a1b27f0bbe Mon Sep 17 00:00:00 2001 From: Haiwei Xu Date: Tue, 18 Aug 2015 10:21:26 +0900 Subject: [PATCH] Fix TypeError when doing cluster-scale-in When trying to scale-in a cluster without configuring 'count' option, TypeError will happen. This is because 'count' is not the key of 'params'. Closes-Bug: #1485820 Change-Id: I753bf2f9234910271254e6a60110b98a3d9994c7 --- senlinclient/v1/client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/senlinclient/v1/client.py b/senlinclient/v1/client.py index 48381b80..405ec696 100644 --- a/senlinclient/v1/client.py +++ b/senlinclient/v1/client.py @@ -102,7 +102,8 @@ class Client(object): def action(self, cls, options): def filter_args(method, params): expected_args = inspect.getargspec(method).args - accepted_args = ([a for a in expected_args if a != 'self']) + accepted_args = ([a for a in expected_args and params + if a != 'self']) filtered_args = dict((d, params[d]) for d in accepted_args) return filtered_args