mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Remove Python 2.5ism and undefined local access.
This commit is contained in:
parent
1b725c3acf
commit
c2379f7c21
@ -107,7 +107,7 @@ class LaTeXBuilder(Builder):
|
||||
except UnicodeError:
|
||||
self.warn("a Unicode error occurred when writing the output. "
|
||||
"Please make sure all config values that contain "
|
||||
"non-ASCII content are Unicode strings." % pagename)
|
||||
"non-ASCII content are Unicode strings.")
|
||||
return
|
||||
self.info("done")
|
||||
|
||||
|
@ -121,11 +121,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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user