Fix exception if you don't have pygments installed

This commit is contained in:
Michael van Tellingen
2011-02-03 21:46:03 +01:00
parent 410166196c
commit d799485472
+4 -1
View File
@@ -20,7 +20,10 @@ class SQLAlchemyDebugPanel(DebugPanel):
Panel that displays the time a response took in milliseconds.
"""
name = 'SQLAlchemy'
style = get_style_by_name('colorful')
if HAVE_PYGMENTS:
style = get_style_by_name('colorful')
else:
style = None
@property
def has_content(self):