aboutsummaryrefslogtreecommitdiff
path: root/script/mconfig.py
diff options
context:
space:
mode:
authorYifan Lu2016-11-23 14:34:33 -0600
committerYifan Lu2016-11-23 14:34:33 -0600
commitbd5ebb7a0a4e102731de72832f3e12e9f54d541a (patch)
treebef4f637a270d3f7d2551ac74a89e6b4bad8adec /script/mconfig.py
parentFixed proper encoding of PUSH (STMDB) as ARM manual was wrong... (diff)
parentavoid UB (diff)
downloadsubstitute-bd5ebb7a0a4e102731de72832f3e12e9f54d541a.tar.gz
Merge branch 'master' of https://github.com/comex/substitute
Diffstat (limited to 'script/mconfig.py')
-rw-r--r--script/mconfig.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/script/mconfig.py b/script/mconfig.py
index 0030f60..39d801a 100644
--- a/script/mconfig.py
+++ b/script/mconfig.py
@@ -274,7 +274,7 @@ class Option(object):
if not self.show:
# If you didn't mention the option in help, you don't get no stinking value. This is for ignored options only.
return
- if value is (False if self.bool else None):
+ if value is None:
value = self.default
if callable(value): # Pending
value = value()
@@ -388,11 +388,13 @@ def _make_argparse(include_unused, include_env):
action='store_true' if opt.bool else 'store',
dest=opt.name[2:],
help=opt.help,
+ default=None,
**kw)
if opt.bool and include_unused:
ag.add_argument(opt.opposite,
action='store_false',
dest=opt.name[2:],
+ default=None,
**kw)
return parser