diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-12-15 18:05:35 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-12-15 18:05:35 +0300 |
commit | 712c20a3d91cd80247c5625782ba8ada2b2c2378 (patch) | |
tree | d151c391d9bc18aa2ceffa455efa658bafc1ec29 /sphinx/config.py | |
parent | 5a03cac7d369ea71e1414792df62668ca5fd8190 (diff) | |
parent | cb5fab5db90c2177ede34af876b19e58b9dc1263 (diff) |
Merge branch '2.0'
Diffstat (limited to 'sphinx/config.py')
-rw-r--r-- | sphinx/config.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sphinx/config.py b/sphinx/config.py index 691cdac11..c12841acb 100644 --- a/sphinx/config.py +++ b/sphinx/config.py @@ -186,6 +186,12 @@ class Config: defvalue = self.values[name][0] if self.values[name][2] == Any: return value + elif type(defvalue) is bool or self.values[name][2] == [bool]: + if value == '0': + # given falsy string from command line option + return False + else: + return bool(value) elif isinstance(defvalue, dict): raise ValueError(__('cannot override dictionary config setting %r, ' 'ignoring (use %r to set individual elements)') % |