diff options
author | Kevin Rocard <kevin.rocard@intel.com> | 2015-03-27 20:40:12 +0100 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2015-04-24 13:39:12 -0700 |
commit | 6bd9fcf524e77a1ca7469d6d91c58afd242d388a (patch) | |
tree | b4e0ffa091575d104236cf534919b8ad8bb22f24 /tools | |
parent | 0bb508d358ebe25d61122bde9905db6661591ba0 (diff) | |
download | external_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-x | tools/coverage/coverage.py | 2 |
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()) |