From 4266b8c7a3e381435332d6673fbb103e60c0722c Mon Sep 17 00:00:00 2001 From: Soonho Kong Date: Wed, 4 Mar 2015 16:41:42 -0500 Subject: [PATCH] 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 --- bin/linja.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/linja.in b/bin/linja.in index 807a34df1..954c6bf82 100755 --- a/bin/linja.in +++ b/bin/linja.in @@ -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(":")]