From 6bd9fcf524e77a1ca7469d6d91c58afd242d388a Mon Sep 17 00:00:00 2001
From: Kevin Rocard <kevin.rocard@intel.com>
Date: Fri, 27 Mar 2015 20:40:12 +0100
Subject: [coverage] Correct line number msg

When an error occurs during input parsing,
the line number was incorrectly displayed.

In python, enumerating an iterable will yield
an pair of index and a value.
This index starts at 0: next(enumerate([""])) == (0, "")

This index was displayed as the line number.

Add one to the index to get the line number.

Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
---
 tools/coverage/coverage.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/coverage/coverage.py b/tools/coverage/coverage.py
index f6f7789..8c18bc7 100755
--- a/tools/coverage/coverage.py
+++ b/tools/coverage/coverage.py
@@ -834,7 +834,7 @@ class ParsePFWlog():
 
 
     def parsePFWlog(self, lines):
-        for lineNb, lineLog in enumerate(lines):
+        for lineNb, lineLog in enumerate(lines, 1): # line number starts at 1
 
             logger.debug("Parsing line :%s" % lineLog.rstrip())
 
-- 
cgit v1.1