Skip to content

Commit ac8ae30

Browse files
committed
cli: fix argument parsing for set command, fixes unicode monkey char
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
1 parent 77e957c commit ac8ae30

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

tools/cli/cloudmonkey/cloudmonkey.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555

5656
class CloudStackShell(cmd.Cmd):
57-
intro = ("☁ Apache CloudStack cloudmonkey " + __version__ +
57+
intro = ("☁ Apache CloudStack 🐵 cloudmonkey " + __version__ +
5858
". Type help or ? to list commands.\n")
5959
ruler = "-"
6060
config_file = os.path.expanduser('~/.cloudmonkey_config')
@@ -77,7 +77,7 @@ def __init__(self):
7777
for key in self.config_fields.keys():
7878
setattr(self, key, self.config_fields[key])
7979
config = self.write_config()
80-
print("🙉 Set your apiKey, secretKey, host, port, prompt, color,"
80+
print("🐵 Set your apiKey, secretKey, host, port, prompt, color,"
8181
" log_file, history_file using the set command!")
8282

8383
for key in self.config_fields.keys():
@@ -318,13 +318,14 @@ def do_set(self, args):
318318
"""
319319
Set config for CloudStack CLI. Available options are:
320320
host, port, apiKey, secretKey, log_file, history_file
321+
You may also edit your ~/.cloudmonkey_config instead of using set.
321322
322323
Example:
323324
set host 192.168.56.2
324-
set prompt 🙉 cloudmonkey>
325+
set prompt 🐵 cloudmonkey>
325326
set log_file /var/log/cloudmonkey.log
326327
"""
327-
args = args.split(' ')
328+
args = shlex.split(args.strip())
328329
if len(args) == 2:
329330
key, value = args
330331
# Note: keys and fields should have same names

0 commit comments

Comments
 (0)