fix(bin/linja.in): filter empty lines at FlycheckItem.fromString

Found this bug while helping Andrew Zipperer. It happened in Windows7/8 + Python 2.7
This commit is contained in:
Soonho Kong 2015-03-04 16:41:42 -05:00
parent fde83cd376
commit 4266b8c7a3

View file

@ -133,8 +133,9 @@ class FlycheckItem:
return (self.filename, self.ty, self.lineno, self.colno)
@classmethod
def fromString(cls, text):
# Filter out empty lines
lines = [line for line in text.splitlines() if len(line) > 0]
# Throw the first and last lines (header/footer)
lines = text.splitlines()
lines = lines[1:-1]
firstLine = lines[0]
items = [item.strip() for item in firstLine.split(":")]