diff --git a/docs/conf.py b/docs/conf.py index af55f506d5..7768611e89 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -29,14 +29,15 @@ import os import sys import sphinx -from sphinx.errors import VersionRequirementError +from sphinx.errors import ConfigError # Make Sphinx fail cleanly if using an old Python, rather than obscurely # failing because some code in one of our extensions doesn't work there. -# Unfortunately this doesn't display very neatly (there's an unavoidable -# Python backtrace) but at least the information gets printed... +# In newer versions of Sphinx this will display nicely; in older versions +# Sphinx will also produce a Python backtrace but at least the information +# gets printed... if sys.version_info < (3,5): - raise VersionRequirementError( + raise ConfigError( "QEMU requires a Sphinx that uses Python 3.5 or better\n") # The per-manual conf.py will set qemu_docdir for a single-manual build;