summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKevin Rocard <kevin.rocard@intel.com>2015-03-27 20:40:12 +0100
committerEric Laurent <elaurent@google.com>2015-04-24 13:39:12 -0700
commit6bd9fcf524e77a1ca7469d6d91c58afd242d388a (patch)
treeb4e0ffa091575d104236cf534919b8ad8bb22f24 /tools
parent0bb508d358ebe25d61122bde9905db6661591ba0 (diff)
downloadexternal_parameter-framework-6bd9fcf524e77a1ca7469d6d91c58afd242d388a.zip
external_parameter-framework-6bd9fcf524e77a1ca7469d6d91c58afd242d388a.tar.gz
external_parameter-framework-6bd9fcf524e77a1ca7469d6d91c58afd242d388a.tar.bz2
[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>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/coverage/coverage.py2
1 files changed, 1 insertions, 1 deletions
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())