mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Closes #1602: allow overriding lambda values with strings
This commit is contained in:
parent
5fedc69fec
commit
165db545ef
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user