summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pastepy/pastepy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pastepy/pastepy.py b/pastepy/pastepy.py
index ca113c0..9b86d17 100644
--- a/pastepy/pastepy.py
+++ b/pastepy/pastepy.py
@@ -34,7 +34,7 @@ class CustomHtmlFormatter(HtmlFormatter):
yield 0, '</pre>'
def init_lexers():
- all_lexers = dict([(x[0], x[1][0]) for x in get_all_lexers()])
+ all_lexers = dict([(x[0], x[1][0] if x[1] else x[0]) for x in get_all_lexers()])
lexers = []
removed = []
for cat, ls in current_app.config['CATEGORIES']: