mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #3692: Unable to build HTML if writing .buildinfo failed
This commit is contained in:
parent
8486f106b0
commit
46bf9ab4a0
1
CHANGES
1
CHANGES
@ -25,6 +25,7 @@ Bugs fixed
|
|||||||
* #4096: C++, don't crash when using the wrong role type. Thanks to mitya57.
|
* #4096: C++, don't crash when using the wrong role type. Thanks to mitya57.
|
||||||
* #4070, #4111: crashes when the warning message contains format strings (again)
|
* #4070, #4111: crashes when the warning message contains format strings (again)
|
||||||
* #4108: Search word highlighting breaks SVG images
|
* #4108: Search word highlighting breaks SVG images
|
||||||
|
* #3692: Unable to build HTML if writing .buildinfo failed
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
--------
|
--------
|
||||||
|
@ -776,12 +776,15 @@ class StandaloneHTMLBuilder(Builder):
|
|||||||
def write_buildinfo(self):
|
def write_buildinfo(self):
|
||||||
# type: () -> None
|
# type: () -> None
|
||||||
# write build info file
|
# write build info file
|
||||||
with open(path.join(self.outdir, '.buildinfo'), 'w') as fp:
|
try:
|
||||||
fp.write('# Sphinx build info version 1\n'
|
with open(path.join(self.outdir, '.buildinfo'), 'w') as fp:
|
||||||
'# This file hashes the configuration used when building'
|
fp.write('# Sphinx build info version 1\n'
|
||||||
' these files. When it is not found, a full rebuild will'
|
'# This file hashes the configuration used when building'
|
||||||
' be done.\nconfig: %s\ntags: %s\n' %
|
' these files. When it is not found, a full rebuild will'
|
||||||
(self.config_hash, self.tags_hash))
|
' be done.\nconfig: %s\ntags: %s\n' %
|
||||||
|
(self.config_hash, self.tags_hash))
|
||||||
|
except IOError as exc:
|
||||||
|
logger.warning('Failed to write build info file: %r', exc)
|
||||||
|
|
||||||
def cleanup(self):
|
def cleanup(self):
|
||||||
# type: () -> None
|
# type: () -> None
|
||||||
|
Loading…
Reference in New Issue
Block a user