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
This commit is contained in:
parent
207d59d408
commit
ab97276542
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user