提交 b0783c79 编写于 作者: Y Yang Zhang 提交者: qingqing01

Fix a bug in command line option parsing (#2841)

option should not be overridden by subsequent options of the same module
上级 c755cdff
......@@ -68,7 +68,8 @@ class ArgsParser(ArgumentParser):
config[k] = yaml.load(v, Loader=yaml.Loader)
else:
keys = k.split('.')
config[keys[0]] = {}
if keys[0] not in config:
config[keys[0]] = {}
cur = config[keys[0]]
for idx, key in enumerate(keys[1:]):
if idx == len(keys) - 2:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册