mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 08:02:54 +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'):
|
def pygmentize(code_string, lexer_name='text'):
|
||||||
try:
|
try:
|
||||||
lexer = get_lexer_by_name(lexer_name)
|
lexer = get_lexer_by_name(lexer_name)
|
||||||
except ClassNotFound:
|
except (TypeError, ClassNotFound):
|
||||||
logger.warning('Could not find lexer for name "%s"' % lexer_name)
|
logger.warning('Could not find lexer for name "%s"' % lexer_name)
|
||||||
lexer = PythonLexer()
|
lexer = PythonLexer()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue