diff options
| author | Georg Brandl <georg@python.org> | 2010-01-12 23:40:26 +0000 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2010-01-12 23:40:26 +0000 |
| commit | 8c19002e83deb58e22ee7b2898757c05032cd3df (patch) | |
| tree | 4e1aa5dafdd64786dac97619c0f4f83c46675a55 /sphinx/config.py | |
| parent | 52c246e013366318c682d591d9978304bdf7ff4f (diff) | |
| parent | 3f0c78f1e7208b77e1c0cfa18ce2b0ed6f01005b (diff) | |
| download | sphinx-8c19002e83deb58e22ee7b2898757c05032cd3df.tar.gz | |
merge with 0.6
Diffstat (limited to 'sphinx/config.py')
| -rw-r--r-- | sphinx/config.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sphinx/config.py b/sphinx/config.py index bbc3297a..4c1e92e1 100644 --- a/sphinx/config.py +++ b/sphinx/config.py @@ -144,11 +144,12 @@ class Config(object): config['tags'] = tags olddir = os.getcwd() try: - os.chdir(dirname) - execfile(config['__file__'], config) - except SyntaxError, err: - raise ConfigError('There is a syntax error in your ' - 'configuration file: ' + str(err)) + try: + os.chdir(dirname) + execfile(config['__file__'], config) + except SyntaxError, err: + raise ConfigError('There is a syntax error in your ' + 'configuration file: ' + str(err)) finally: os.chdir(olddir) |
