提交 e5fc7cf7 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Have docgen.py exit with an error if a call to sphinx returns one.

上级 c01215fd
...@@ -64,7 +64,9 @@ if __name__ == '__main__': ...@@ -64,7 +64,9 @@ if __name__ == '__main__':
inopt = [docpath, workdir] inopt = [docpath, workdir]
if files is not None: if files is not None:
inopt.extend(files) inopt.extend(files)
sphinx.build_main(['', '-b', builder] + extraopts + inopt) ret = sphinx.build_main(['', '-b', builder] + extraopts + inopt)
if ret != 0:
sys.exit(ret)
if options['--all'] or options['--rst']: if options['--all'] or options['--rst']:
mkdir("doc") mkdir("doc")
...@@ -92,5 +94,6 @@ if __name__ == '__main__': ...@@ -92,5 +94,6 @@ if __name__ == '__main__':
mkdir("doc") mkdir("doc")
sys.path[0:0] = [os.path.join(throot, 'doc')] sys.path[0:0] = [os.path.join(throot, 'doc')]
call_sphinx('doctest', '.') call_sphinx('doctest', '.')
# To go back to the original current directory. # To go back to the original current directory.
os.chdir(currentdir) os.chdir(currentdir)
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论