tracetool: prefix parse errors with line numbers
commit5069b561894206b65a16c3b8cfebd6b3e76c61d6
authorStefan Hajnoczi <stefanha@redhat.com>
Wed, 10 Jan 2018 20:25:51 +0000 (10 20:25 +0000)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 29 Jan 2018 10:34:55 +0000 (29 10:34 +0000)
treeb75aa2d0ab03abc3d86876f25509bb3240484073
parent6233b4a8c2a32ef6955a921246fa08705bbb3676
tracetool: prefix parse errors with line numbers

Include the file line number in the message that is printed when
trace-events parse errors are raised.

[Use enumerate(fobj, 1) to avoid having to increment a 0-based index
later, as suggested by Eric Blake.
--Stefan]

Suggested-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20180110202553.31889-2-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
scripts/tracetool/__init__.py