From de829e4cfd1758c969baf652dbe1ac0ebb90d0d4 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Tue, 18 Nov 2014 17:17:42 +0100 Subject: [PATCH] Also allow default theme for documentation. Fix #134 --- docs/conf.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index a4598b5..c29c6f3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -32,10 +32,17 @@ pygments_style = 'sphinx' on_rtd = os.environ.get('READTHEDOCS', None) == 'True' -if not on_rtd: +try: import sphinx_rtd_theme html_theme = 'sphinx_rtd_theme' html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] +except ImportError: + html_theme = 'default' + if not on_rtd: + print('-' * 74) + print('Warning: sphinx-rtd-theme not installed, building with default ' + 'theme.') + print('-' * 74) html_static_path = ['_static'] htmlhelp_basename = 'vdirsyncerdoc'