You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2012/11/06 13:30:42 UTC

git commit: cli: fix argument parsing for set command, fixes unicode monkey char

Updated Branches:
  refs/heads/master 77e957c91 -> ac8ae3065


cli: fix argument parsing for set command, fixes unicode monkey char

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/ac8ae306
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/ac8ae306
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/ac8ae306

Branch: refs/heads/master
Commit: ac8ae306589ef9d7c0675b3ee7a44bc7903ead09
Parents: 77e957c
Author: Rohit Yadav <bh...@apache.org>
Authored: Tue Nov 6 17:59:53 2012 +0530
Committer: Rohit Yadav <bh...@apache.org>
Committed: Tue Nov 6 17:59:53 2012 +0530

----------------------------------------------------------------------
 tools/cli/cloudmonkey/cloudmonkey.py |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ac8ae306/tools/cli/cloudmonkey/cloudmonkey.py
----------------------------------------------------------------------
diff --git a/tools/cli/cloudmonkey/cloudmonkey.py b/tools/cli/cloudmonkey/cloudmonkey.py
index ea904b0..d980a21 100644
--- a/tools/cli/cloudmonkey/cloudmonkey.py
+++ b/tools/cli/cloudmonkey/cloudmonkey.py
@@ -54,7 +54,7 @@ completions = cloudstackAPI.__all__
 
 
 class CloudStackShell(cmd.Cmd):
-    intro = ("☁ Apache CloudStack cloudmonkey " + __version__ +
+    intro = ("☁ Apache CloudStack 🐵 cloudmonkey " + __version__ +
              ". Type help or ? to list commands.\n")
     ruler = "-"
     config_file = os.path.expanduser('~/.cloudmonkey_config')
@@ -77,7 +77,7 @@ class CloudStackShell(cmd.Cmd):
             for key in self.config_fields.keys():
                 setattr(self, key, self.config_fields[key])
             config = self.write_config()
-            print("🙉  Set your apiKey, secretKey, host, port, prompt, color,"
+            print("🐵 Set your apiKey, secretKey, host, port, prompt, color,"
                   " log_file, history_file using the set command!")
 
         for key in self.config_fields.keys():
@@ -318,13 +318,14 @@ class CloudStackShell(cmd.Cmd):
         """
         Set config for CloudStack CLI. Available options are:
         host, port, apiKey, secretKey, log_file, history_file
+        You may also edit your ~/.cloudmonkey_config instead of using set.
 
         Example:
         set host 192.168.56.2
-        set prompt 🙉 cloudmonkey>
+        set prompt 🐵 cloudmonkey>
         set log_file /var/log/cloudmonkey.log
         """
-        args = args.split(' ')
+        args = shlex.split(args.strip())
         if len(args) == 2:
             key, value = args
             # Note: keys and fields should have same names