"git@developer.sourcefind.cn:yangql/googletest.git" did not exist on "fa3f444be1700c066d1cddba1bcb8789730bfbae"
Unverified Commit 08d25bd2 authored by guoshzhao's avatar guoshzhao Committed by GitHub
Browse files

Bug Fix - Fix bug when convert bool config to store_true argument. (#120)

parent 5d6bc58d
...@@ -85,8 +85,9 @@ def __get_arguments(self, parameters): ...@@ -85,8 +85,9 @@ def __get_arguments(self, parameters):
for name, val in parameters.items(): for name, val in parameters.items():
if val is None: if val is None:
continue continue
if isinstance(val, bool) and val: if isinstance(val, bool):
argv.append('--{}'.format(name)) if val:
argv.append('--{}'.format(name))
elif isinstance(val, (str, int, float)): elif isinstance(val, (str, int, float)):
argv.append('--{} {}'.format(name, val)) argv.append('--{} {}'.format(name, val))
elif isinstance(val, (list, ListConfig)): elif isinstance(val, (list, ListConfig)):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment