Skip to content

Commit d99f836

Browse files
committed
cli: Fix attribute error and fix helpdoc
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
1 parent 2a0c2be commit d99f836

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tools/cli/cloudmonkey/cloudmonkey.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class CloudMonkeyShell(cmd.Cmd, object):
6565
ruler = "="
6666
cache_file = cache_file
6767
config_options = []
68+
verbs = []
6869

6970
def __init__(self, pname):
7071
self.program_name = pname
@@ -246,7 +247,7 @@ def default(self, args):
246247
args_dict.pop('filter').split(',')))
247248

248249
missing_args = []
249-
if verb in self.apicache:
250+
if verb in self.apicache and subject in self.apicache[verb]:
250251
missing_args = filter(lambda x: x not in args_dict.keys(),
251252
self.apicache[verb][subject]['requiredparams'])
252253

@@ -388,7 +389,6 @@ def do_help(self, args):
388389
if subject in self.apicache[verb]:
389390
api = self.apicache[verb][subject]
390391
helpdoc = "(%s) %s" % (api['name'], api['description'])
391-
helpdoc = api['description']
392392
if api['isasync']:
393393
helpdoc += "\nThis API is asynchronous."
394394
required = api['requiredparams']

0 commit comments

Comments
 (0)