aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django/git_wiki
diff options
context:
space:
mode:
Diffstat (limited to 'bn_django/git_wiki')
-rw-r--r--bn_django/git_wiki/views.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/bn_django/git_wiki/views.py b/bn_django/git_wiki/views.py
index dcd1646..58d4194 100644
--- a/bn_django/git_wiki/views.py
+++ b/bn_django/git_wiki/views.py
@@ -223,12 +223,12 @@ def view_commit(request, hash):
(heads, tags) = reposcan()
c = Commit(id=hash)
c.update()
-
- from pygments import highlight
- from pygments.lexers import DiffLexer
- from pygments.formatters import HtmlFormatter
-
- c.pretty_diff = highlight(c.rawdiff, DiffLexer(), HtmlFormatter())
+ try:
+ from pygments import highlight
+ from pygments.lexers import DiffLexer
+ from pygments.formatters import HtmlFormatter
+ c.pretty_diff = highlight(c.rawdiff, DiffLexer(), HtmlFormatter())
+ except: pass
return render_to_response('git_wiki/commit.html',
dict(heads=heads, tags=tags,