From 7e9aebaeb72b624eb9f15c6745f3b4ab34b25077 Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Mon, 10 Aug 2015 20:10:39 -0700 Subject: [PATCH] only use lexer if one was found, to fix #33 --- plugin/packages/wakatime/stats.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/packages/wakatime/stats.py b/plugin/packages/wakatime/stats.py index 8bf8c01..b04e7ac 100644 --- a/plugin/packages/wakatime/stats.py +++ b/plugin/packages/wakatime/stats.py @@ -39,8 +39,8 @@ def guess_language(file_name): return language, None lexer = smart_guess_lexer(file_name) - - language = u(lexer.name) + if lexer: + language = u(lexer.name) return language, lexer