mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-05-07 17:29:50 +00:00
Catch Spinx SystemExit when building help
In a recent Sphinx release, it started calling `sys.exit()` and that caused our whole build process to exit prematurely.
This commit is contained in:
parent
9e9e73aa6b
commit
990e73c383
@ -1,9 +1,9 @@
|
||||
# Created By: Virgil Dupras
|
||||
# Created On: 2011-01-12
|
||||
# Copyright 2014 Hardcoded Software (http://www.hardcoded.net)
|
||||
#
|
||||
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
|
||||
# which should be included with this package. The terms are also available at
|
||||
#
|
||||
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
|
||||
# which should be included with this package. The terms are also available at
|
||||
# http://www.hardcoded.net/licenses/bsd_license
|
||||
|
||||
import os.path as op
|
||||
@ -31,7 +31,7 @@ def tixgen(tixurl):
|
||||
|
||||
def gen(basepath, destpath, changelogpath, tixurl, confrepl=None, confpath=None, changelogtmpl=None):
|
||||
"""Generate sphinx docs with all bells and whistles.
|
||||
|
||||
|
||||
basepath: The base sphinx source path.
|
||||
destpath: The final path of html files
|
||||
changelogpath: The path to the changelog file to insert in changelog.rst.
|
||||
@ -66,4 +66,7 @@ def gen(basepath, destpath, changelogpath, tixurl, confrepl=None, confpath=None,
|
||||
# missing dependencies which are in the virtualenv). Here, we do exactly what is done when
|
||||
# calling the command from bash.
|
||||
cmd = load_entry_point('Sphinx', 'console_scripts', 'sphinx-build')
|
||||
cmd(['sphinx-build', basepath, destpath])
|
||||
try:
|
||||
cmd(['sphinx-build', basepath, destpath])
|
||||
except SystemExit:
|
||||
print("Sphinx called sys.exit(), but we're cancelling it because we don't acutally want to exit")
|
||||
|
Loading…
x
Reference in New Issue
Block a user