cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject git commit: cloudmonkey: don't allow empty values of set "options"
Date Mon, 01 Sep 2014 10:33:46 GMT
Repository: cloudstack-cloudmonkey
Updated Branches:
  refs/heads/master b3673c8c0 -> 61d6b98bc


cloudmonkey: don't allow empty values of set "options"

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/commit/61d6b98b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/tree/61d6b98b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/diff/61d6b98b

Branch: refs/heads/master
Commit: 61d6b98bca3fc4b560a78f16472cd088e97a6f49
Parents: b3673c8
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
Authored: Mon Sep 1 12:33:26 2014 +0200
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Mon Sep 1 12:33:26 2014 +0200

----------------------------------------------------------------------
 cloudmonkey/cloudmonkey.py | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/blob/61d6b98b/cloudmonkey/cloudmonkey.py
----------------------------------------------------------------------
diff --git a/cloudmonkey/cloudmonkey.py b/cloudmonkey/cloudmonkey.py
index 7de3dff..b74afea 100644
--- a/cloudmonkey/cloudmonkey.py
+++ b/cloudmonkey/cloudmonkey.py
@@ -421,6 +421,12 @@ class CloudMonkeyShell(cmd.Cmd, object):
         """
         args = args.strip().partition(" ")
         key, value = (args[0], args[2])
+        if not key:
+            return
+        if not value:
+            print "Blank value of %s is not allowed" % key
+            return
+
         setattr(self, key, value)
         if key in ['host', 'port', 'path', 'protocol']:
             key = 'url'


Mime
View raw message