From d99f836d5d72fee807569bfb27ba53d2492ccfc8 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Wed, 6 Feb 2013 16:51:38 +0530 Subject: [PATCH] cli: Fix attribute error and fix helpdoc Signed-off-by: Rohit Yadav --- tools/cli/cloudmonkey/cloudmonkey.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/cli/cloudmonkey/cloudmonkey.py b/tools/cli/cloudmonkey/cloudmonkey.py index db7104a781d..53f73bd3e72 100644 --- a/tools/cli/cloudmonkey/cloudmonkey.py +++ b/tools/cli/cloudmonkey/cloudmonkey.py @@ -65,6 +65,7 @@ class CloudMonkeyShell(cmd.Cmd, object): ruler = "=" cache_file = cache_file config_options = [] + verbs = [] def __init__(self, pname): self.program_name = pname @@ -246,7 +247,7 @@ class CloudMonkeyShell(cmd.Cmd, object): args_dict.pop('filter').split(','))) missing_args = [] - if verb in self.apicache: + if verb in self.apicache and subject in self.apicache[verb]: missing_args = filter(lambda x: x not in args_dict.keys(), self.apicache[verb][subject]['requiredparams']) @@ -388,7 +389,6 @@ class CloudMonkeyShell(cmd.Cmd, object): if subject in self.apicache[verb]: api = self.apicache[verb][subject] helpdoc = "(%s) %s" % (api['name'], api['description']) - helpdoc = api['description'] if api['isasync']: helpdoc += "\nThis API is asynchronous." required = api['requiredparams']