mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
The dirname
argument for eval_config_file() is now required
This commit is contained in:
parent
2a43b44ec6
commit
7aaa4948f5
@ -156,7 +156,10 @@ class Config(object):
|
|||||||
'Use Config.read() to read configuration from conf.py.',
|
'Use Config.read() to read configuration from conf.py.',
|
||||||
RemovedInSphinx30Warning)
|
RemovedInSphinx30Warning)
|
||||||
dirname, filename, overrides, tags = args
|
dirname, filename, overrides, tags = args
|
||||||
config = eval_config_file(dirname, filename, tags)
|
if dirname is None:
|
||||||
|
config = {}
|
||||||
|
else:
|
||||||
|
config = eval_config_file(dirname, filename, tags)
|
||||||
else:
|
else:
|
||||||
# new style arguments: (config={}, overrides={})
|
# new style arguments: (config={}, overrides={})
|
||||||
if len(args) == 0:
|
if len(args) == 0:
|
||||||
@ -316,9 +319,6 @@ class Config(object):
|
|||||||
def eval_config_file(confdir, filename, tags):
|
def eval_config_file(confdir, filename, tags):
|
||||||
# type: (unicode, unicode, Tags) -> Dict[unicode, Any]
|
# type: (unicode, unicode, Tags) -> Dict[unicode, Any]
|
||||||
"""Evaluate a config file."""
|
"""Evaluate a config file."""
|
||||||
if confdir is None:
|
|
||||||
return {}
|
|
||||||
|
|
||||||
config_path = path.join(confdir, filename)
|
config_path = path.join(confdir, filename)
|
||||||
namespace = {} # type: Dict[unicode, Any]
|
namespace = {} # type: Dict[unicode, Any]
|
||||||
namespace['__file__'] = config_path
|
namespace['__file__'] = config_path
|
||||||
|
Loading…
Reference in New Issue
Block a user