Skip to content

Commit

Permalink
Merge pull request #158 from dtcenter/feature_157_keyerror
Browse files Browse the repository at this point in the history
Fix KeyError Issue #157 make sure lookahead does not go past end
  • Loading branch information
venitahagerty authored Dec 9, 2022
2 parents d96932e + e9f708f commit 6b35ec3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion METdbLoad/ush/read_data_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def read_data(self, load_flags, load_files, line_types):

if mtd_row[CN.OBJECT_ID] == obj_id:
obj_ct += 1
if obj_ct == 2 and row_num < last_line and \
if obj_ct == 2 and (row_num + 1) < last_line and \
mtd_file[CN.OBJECT_ID][row_num + 1] == obj_id:
rev_ctr += 1
create_new = True
Expand Down

0 comments on commit 6b35ec3

Please sign in to comment.