diff --git a/docs/conf.py b/docs/conf.py index 290a1f9043..c925574d81 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -100,15 +100,11 @@ pygments_style = 'sphinx' # a list of builtin themes. html_theme = 'default' -# See: https://docs.readthedocs.io/en/stable/reference/environment-variables.html#envvar-READTHEDOCS -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' - -if on_rtd: # only import and set the theme if we're building docs on readthedocs - try: - import sphinx_rtd_theme - html_theme = 'sphinx_rtd_theme' - except: - html_theme = 'default' +try: + import sphinx_rtd_theme + html_theme = 'sphinx_rtd_theme' +except: + print('WARNING: The python module sphinx_rtd_theme was not found, using the default theme. Debian package: python3-sphinx-rtd-theme') # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the