Commit fb4277aa authored by Christian Hergert's avatar Christian Hergert

html-preview: try to locate newer style sphinx command

parent 93a7d6f2
......@@ -488,7 +488,13 @@ class HtmlPreviewPage(Ide.Page):
rel_path_html = os.path.splitext(rel_path)[0] + '.html'
builddir_path = os.path.join(builddir, rel_path_html)
result = not sphinx.build_main(command)
try:
import sphinx.cmd.build
build_main = sphinx.cmd.build.main
except:
build_main = sphinx.build_main
result = not build_main(command)
remove_override_file(path)
if not result:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment