mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
merge
This commit is contained in:
commit
367614d23a
2
CHANGES
2
CHANGES
@ -66,6 +66,8 @@ Release 1.2 (in development)
|
|||||||
|
|
||||||
* #1041: Fix cpp domain parser fails to parse a const type with a modifier.
|
* #1041: Fix cpp domain parser fails to parse a const type with a modifier.
|
||||||
|
|
||||||
|
* #958: Do not preserve ``environment.pickle`` after a failed build.
|
||||||
|
|
||||||
* PR#88: Added the "Sphinx Developer's Guide" (:file:`doc/devguide.rst`)
|
* PR#88: Added the "Sphinx Developer's Guide" (:file:`doc/devguide.rst`)
|
||||||
which outlines the basic development process of the Sphinx project.
|
which outlines the basic development process of the Sphinx project.
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
:license: BSD, see LICENSE for details.
|
:license: BSD, see LICENSE for details.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
import types
|
import types
|
||||||
import posixpath
|
import posixpath
|
||||||
@ -203,6 +204,10 @@ class Sphinx(object):
|
|||||||
else:
|
else:
|
||||||
self.builder.build_update()
|
self.builder.build_update()
|
||||||
except Exception, err:
|
except Exception, err:
|
||||||
|
# delete the saved env to force a fresh build next time
|
||||||
|
envfile = path.join(self.doctreedir, ENV_PICKLE_FILENAME)
|
||||||
|
if path.isfile(envfile):
|
||||||
|
os.unlink(envfile)
|
||||||
self.emit('build-finished', err)
|
self.emit('build-finished', err)
|
||||||
raise
|
raise
|
||||||
else:
|
else:
|
||||||
|
@ -365,9 +365,7 @@ class BuildEnvironment:
|
|||||||
del self.config.values
|
del self.config.values
|
||||||
domains = self.domains
|
domains = self.domains
|
||||||
del self.domains
|
del self.domains
|
||||||
# first write to a temporary file, so that if dumping fails,
|
picklefile = open(filename, 'wb')
|
||||||
# the existing environment won't be overwritten
|
|
||||||
picklefile = open(filename + '.tmp', 'wb')
|
|
||||||
# remove potentially pickling-problematic values from config
|
# remove potentially pickling-problematic values from config
|
||||||
for key, val in vars(self.config).items():
|
for key, val in vars(self.config).items():
|
||||||
if key.startswith('_') or \
|
if key.startswith('_') or \
|
||||||
@ -379,7 +377,6 @@ class BuildEnvironment:
|
|||||||
pickle.dump(self, picklefile, pickle.HIGHEST_PROTOCOL)
|
pickle.dump(self, picklefile, pickle.HIGHEST_PROTOCOL)
|
||||||
finally:
|
finally:
|
||||||
picklefile.close()
|
picklefile.close()
|
||||||
movefile(filename + '.tmp', filename)
|
|
||||||
# reset attributes
|
# reset attributes
|
||||||
self.domains = domains
|
self.domains = domains
|
||||||
self.config.values = values
|
self.config.values = values
|
||||||
|
Loading…
Reference in New Issue
Block a user