mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 08:02:54 +11:00
Correct exception
This commit is contained in:
parent
504fcc4369
commit
b192fb1b09
1 changed files with 1 additions and 2 deletions
|
@ -39,8 +39,7 @@ class NakedHtmlFormatter(HtmlFormatter):
|
|||
def pygmentize(code_string, lexer_name='text'):
|
||||
try:
|
||||
return highlight(code_string, get_lexer_by_name(lexer_name), NakedHtmlFormatter())
|
||||
except TypeError:
|
||||
logger.critical('Highlight failed with lexter %s' % lexer_name)
|
||||
except AttributeError:
|
||||
return code_string
|
||||
|
||||
def guess_code_lexer(code_string, default_lexer='unknown'):
|
||||
|
|
Loading…
Reference in a new issue