Repository: cloudstack-cloudmonkey Updated Branches: refs/heads/master b8fc61e99 -> 1980b6cee
CLOUDSTACK-7459: Honour quoted/escaped arguments from command line Signed-off-by: Rohit Yadav <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/commit/1980b6ce Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/tree/1980b6ce Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/diff/1980b6ce Branch: refs/heads/master Commit: 1980b6cee1df63b3561a7115b8cc076375579dcb Parents: b8fc61e Author: Rohit Yadav <[email protected]> Authored: Tue Sep 9 14:45:25 2014 +0200 Committer: Rohit Yadav <[email protected]> Committed: Tue Sep 9 14:47:03 2014 +0200 ---------------------------------------------------------------------- cloudmonkey/cloudmonkey.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/blob/1980b6ce/cloudmonkey/cloudmonkey.py ---------------------------------------------------------------------- diff --git a/cloudmonkey/cloudmonkey.py b/cloudmonkey/cloudmonkey.py index fabbac2..9063f08 100644 --- a/cloudmonkey/cloudmonkey.py +++ b/cloudmonkey/cloudmonkey.py @@ -586,11 +586,13 @@ def main(): shell = CloudMonkeyShell(sys.argv[0], args.configFile) - if args.displayType != None and args.displayType in displayTypes: + if args.displayType is not None and args.displayType in displayTypes: shell.set_attr("display", args.displayType) if len(args.commands) > 0: - shell.onecmd(' '.join(args.commands)) + shell.onecmd(" ".join(map(lambda x: x.replace("\\ ", " ") + .replace(" ", "\\ "), + args.commands))) else: shell.cmdloop()
