diff options
Diffstat (limited to 'sphinx/config.py')
-rw-r--r-- | sphinx/config.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sphinx/config.py b/sphinx/config.py index 1ba98d007..553aa74d6 100644 --- a/sphinx/config.py +++ b/sphinx/config.py @@ -166,6 +166,9 @@ class Config: def read(cls, confdir: str, overrides: Dict = None, tags: Tags = None) -> "Config": """Create a Config object from configuration file.""" filename = path.join(confdir, CONFIG_FILENAME) + if not path.isfile(filename): + raise ConfigError(__("config directory doesn't contain a conf.py file (%s)") % + confdir) namespace = eval_config_file(filename, tags) return cls(namespace, overrides or {}) |