diff options
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 b3cd1dc6d..13159d2d2 100644 --- a/sphinx/config.py +++ b/sphinx/config.py @@ -180,6 +180,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 |