fix #31 by catching exceptions from

This commit is contained in:
Alan Hamlett 2015-07-03 14:25:22 -07:00
parent 3d26b81901
commit 3ee44d5aba

View file

@ -135,7 +135,12 @@ def guess_lexer_using_modeline(text):
lexer, accuracy = None, None
file_type = get_filetype_from_buffer(text)
file_type = None
try:
file_type = get_filetype_from_buffer(text)
except:
pass
if file_type is not None:
try:
lexer = get_lexer_by_name(file_type)