2 # User Georg Brandl <georg@python.org>
3 # Date 1413746745 -7200
4 # Node ID 2d66ade078e490968b21022918b2074389b77dd0
5 # Parent 1e2406af4606eb1f03fd48262114938922e949b8
6 Guard against sys.exit() called while exec()ing the conf.py file.
8 diff --git a/sphinx/config.py b/sphinx/config.py
10 +++ b/sphinx/config.py
12 CONFIG_SYNTAX_ERROR = "There is a syntax error in your configuration file: %s"
14 CONFIG_SYNTAX_ERROR += "\nDid you change the syntax from 2.x to 3.x?"
15 +CONFIG_EXIT_ERROR = "The configuration file (or one of the modules it imports) " \
21 @@ -232,6 +232,8 @@ class Config(object):
22 execfile_(filename, config)
23 except SyntaxError, err:
24 raise ConfigError(CONFIG_SYNTAX_ERROR % err)
26 + raise ConfigError(CONFIG_EXIT_ERROR)