From ab9727654232f26ac5737547348850d861486cec Mon Sep 17 00:00:00 2001 From: cheneydc Date: Thu, 3 Mar 2016 09:25:08 +0800 Subject: [PATCH] Fix the problem when parse config file Mistral cannot parse configure file from command line like this: --config-file="/path/to/config_file" So update the code to recognize configure file rightly. Change-Id: I9f3c23d0437578c9714019c480785198c940d181 Closes-Bug: #1552146 --- mistral/cmd/launch.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mistral/cmd/launch.py b/mistral/cmd/launch.py index 4b7cce1a..b17d2398 100755 --- a/mistral/cmd/launch.py +++ b/mistral/cmd/launch.py @@ -210,10 +210,13 @@ def get_properly_ordered_parameters(): for arg in sys.argv[1:]: if arg == '--config-file' or arg.startswith('--config-file='): - conf_file_value = args[args.index(arg) + 1] - args.remove(conf_file_value) + if "=" in arg: + conf_file_value = arg.split("=", 1)[1] + else: + conf_file_value = args[args.index(arg) + 1] + args.remove(conf_file_value) args.remove(arg) - args.insert(0, arg) + args.insert(0, "--config-file") args.insert(1, conf_file_value) return args