diff options
author | Georg Brandl <georg@python.org> | 2014-10-20 08:23:18 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-10-20 08:23:18 +0200 |
commit | 165db545ef44004c6a3913316a8c601fd1646a15 (patch) | |
tree | 91b67a83153e2fc84f5ca26947850dfc761ac0a5 | |
parent | 5fedc69fec2fb4bc9201abf55d46775064f917a9 (diff) | |
download | sphinx-git-165db545ef44004c6a3913316a8c601fd1646a15.tar.gz |
Closes #1602: allow overriding lambda values with strings
-rw-r--r-- | sphinx/config.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sphinx/config.py b/sphinx/config.py index de8af7c1c..cf6bed087 100644 --- a/sphinx/config.py +++ b/sphinx/config.py @@ -284,9 +284,11 @@ class Config(object): except ValueError: warn('invalid number %r for config value %r, ignoring' % (value, valname)) + elif hasattr(defvalue, '__call__'): + config[valname] = value elif defvalue is not None and not isinstance(defvalue, string_types): - warn('cannot override config setting %r with unsupported type, ' - 'ignoring' % valname) + warn('cannot override config setting %r with unsupported ' + 'type, ignoring' % valname) else: config[valname] = value else: |