You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mc...@apache.org on 2013/03/21 02:04:29 UTC
[15/25] git commit: refs/heads/api_entity - cli: Fix nonetype issue
with cachemaker and exit after printing version
cli: Fix nonetype issue with cachemaker and exit after printing version
Signed-off-by: Rohit Yadav <bh...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/4ad5d1a4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/4ad5d1a4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/4ad5d1a4
Branch: refs/heads/api_entity
Commit: 4ad5d1a4f55a1eb1dc0ebf164f0fe081aeebb2d7
Parents: d7f9aa6
Author: Rohit Yadav <bh...@apache.org>
Authored: Wed Mar 20 12:42:29 2013 +0530
Committer: Rohit Yadav <bh...@apache.org>
Committed: Wed Mar 20 12:42:29 2013 +0530
----------------------------------------------------------------------
tools/cli/cloudmonkey/cachemaker.py | 6 +++++-
tools/cli/cloudmonkey/cloudmonkey.py | 1 +
2 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4ad5d1a4/tools/cli/cloudmonkey/cachemaker.py
----------------------------------------------------------------------
diff --git a/tools/cli/cloudmonkey/cachemaker.py b/tools/cli/cloudmonkey/cachemaker.py
index 8ac123c..a625b01 100644
--- a/tools/cli/cloudmonkey/cachemaker.py
+++ b/tools/cli/cloudmonkey/cachemaker.py
@@ -100,7 +100,11 @@ def monkeycache(apis):
cache['count'] = getvalue(apis[responsekey], 'count')
cache['asyncapis'] = []
- for api in getvalue(apis[responsekey], 'api'):
+ apilist = getvalue(apis[responsekey], 'api')
+ if apilist == None:
+ print "[monkeycache] Server response issue, no apis found"
+
+ for api in apilist:
name = getvalue(api, 'name')
verb, subject = splitverbsubject(name)
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4ad5d1a4/tools/cli/cloudmonkey/cloudmonkey.py
----------------------------------------------------------------------
diff --git a/tools/cli/cloudmonkey/cloudmonkey.py b/tools/cli/cloudmonkey/cloudmonkey.py
index e94d530..a95ab9e 100644
--- a/tools/cli/cloudmonkey/cloudmonkey.py
+++ b/tools/cli/cloudmonkey/cloudmonkey.py
@@ -487,6 +487,7 @@ def main():
if options.version:
print "cloudmonkey", __version__
print __description__, "(%s)" % __projecturl__
+ sys.exit(0)
shell = CloudMonkeyShell(sys.argv[0], options.cfile)
if len(args) > 1: