From 165db545ef44004c6a3913316a8c601fd1646a15 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 20 Oct 2014 08:23:18 +0200 Subject: [PATCH] Closes #1602: allow overriding lambda values with strings --- sphinx/config.py | 6 ++++-- 1 file 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: