From 97d2a198e216b29be5533dfba81525481bc9c1e5 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sat, 17 Jul 2010 16:05:06 +0200 Subject: [PATCH] Added fallback for docs --- docs/conf.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 721c8369..932c9bcd 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -250,3 +250,17 @@ intersphinx_mapping = { } pygments_style = 'flask_theme_support.FlaskyStyle' + +# fall back if theme is not there +try: + __import__('flask_theme_support') +except ImportError, e: + print '-' * 74 + print 'Warning: Flask themes unavailable. Building with default theme' + print 'If you want the Flask themes, run this command and build again:' + print + print ' git submodule init' + print '-' * 74 + + pygments_style = 'tango' + html_theme = 'default'