diff options
author | Frederick Muriuki Muriithi | 2022-04-25 08:25:06 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-04-25 08:25:06 +0300 |
commit | b419a43c851336aeb57407c72c0a37271fbb2ebc (patch) | |
tree | cd3994bc40ea1157575381cf424f01d659478952 /quality_control | |
parent | 20c4028f567f0d4b5df1b80f1b6bea1bc99887b4 (diff) | |
download | gn-uploader-b419a43c851336aeb57407c72c0a37271fbb2ebc.tar.gz |
Advance seek_position on error
Advance the seek position, once we have yielded up an error to causing
an infinite loop in certain conditions, where the `parse_errors`
function ends up resuming the gile in the same position once it
experiences an error.
Diffstat (limited to 'quality_control')
-rw-r--r-- | quality_control/parsing.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/quality_control/parsing.py b/quality_control/parsing.py index e9bd5f7..eb4c989 100644 --- a/quality_control/parsing.py +++ b/quality_control/parsing.py @@ -120,6 +120,7 @@ def parse_errors(filepath: str, filetype: FileType, strains: list, "error": __error_type(err), "message": err.args } + seek_pos = seek_pos + len(line) return ( error for error in __errors(filepath, filetype, strains, seek_pos) |