diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-12-20 15:33:57 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-12-20 15:33:57 +0300 |
commit | a7a77d154ba659c94b06d8b07028f9ae996412e0 (patch) | |
tree | 459ea70c63b048a3e23c86a093c6c655e513e34f /sphinx/config.py | |
parent | d9280e253ad849ac5f843d2900352a76dcfae000 (diff) | |
parent | a7e10c1d36007650b5e3948021d4aa90d78127d4 (diff) |
Merge branch '3.x'
Diffstat (limited to 'sphinx/config.py')
-rw-r--r-- | sphinx/config.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sphinx/config.py b/sphinx/config.py index 005bc812f..02c70cea0 100644 --- a/sphinx/config.py +++ b/sphinx/config.py @@ -173,6 +173,14 @@ class Config: defvalue = self.values[name][0] if self.values[name][2] == Any: return value + elif self.values[name][2] == {bool, str}: + if value == '0': + # given falsy string from command line option + return False + elif value == '1': + return True + else: + return value elif type(defvalue) is bool or self.values[name][2] == [bool]: if value == '0': # given falsy string from command line option |