apel/apel — pull request #16 by tofu-rocketry (2014-06-05 15:52:36+00:00)
Title: File handling and line number reporting fixes

This set of changes resolves #7, and resolves #13.

- Change 'line_no' to 'index' to show its real meaning and then derive
actual line numbers from it by adding 1. This means that error messages
and the StopLine column in ProcessedFiles will be more accurate and
useful.
- Replace deprecated .has_key() with 'in'.
- Add a 'break' into for loop for when a match is found as we don't need to keep on checking.
- Add try...finally block to ensure file is closed as before only non-gzip
files would get closed. This also removed the duplication of calling
parse_file.
- Change "omitting" to "skipping" for ease of understanding.