Use BoolArg when creating arg parser for edges.Settings
This commit is contained in:
parent
1b3f9dbc3a
commit
b440d1c767
|
@ -163,9 +163,14 @@ class Settings(object):
|
|||
|
||||
if type(default) not in (bool, int, float, str):
|
||||
raise ValueError("Type not supported: %r", default)
|
||||
if type(default) is bool:
|
||||
from boxes import BoolArg
|
||||
t = BoolArg()
|
||||
else:
|
||||
t = type(default)
|
||||
|
||||
group.add_argument("--%s_%s" % (prefix, name),
|
||||
type=type(default),
|
||||
type=t,
|
||||
action="store", default=default,
|
||||
choices=choices,
|
||||
help=descriptions.get(name))
|
||||
|
|
Loading…
Reference in New Issue