mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-12-23 23:23:06 +11:00
Catch 'NoneType' object is not callable
This commit is contained in:
parent
19bfd3f769
commit
3adb1ce05d
1 changed files with 1 additions and 1 deletions
|
@ -39,7 +39,7 @@ class NakedHtmlFormatter(HtmlFormatter):
|
|||
def pygmentize(code_string, lexer_name='text'):
|
||||
try:
|
||||
lexer = get_lexer_by_name(lexer_name)
|
||||
except ClassNotFound:
|
||||
except (TypeError, ClassNotFound):
|
||||
logger.warning('Could not find lexer for name "%s"' % lexer_name)
|
||||
lexer = PythonLexer()
|
||||
|
||||
|
|
Loading…
Reference in a new issue