summaryrefslogtreecommitdiff
path: root/sphinx/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/config.py')
-rw-r--r--sphinx/config.py8
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