Skip to content

Commit

Permalink
Break when iteration caused a non-match of the surt URI in the CDXJ
Browse files Browse the repository at this point in the history
  • Loading branch information
machawk1 committed Mar 3, 2020
1 parent 3bc6e37 commit e3a85eb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ipwb/replay.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ def bin_search(iter, key, datetime=None):
elif matchDegree == MementoMatch.EXACTMATCH:
# Exact match found while iterating
return [nextLine]
elif matchDegree == MementoMatch.WRONGKEY:
# Matched keys exhausted
break

nextLine = iter.readline()

Expand Down

0 comments on commit e3a85eb

Please sign in to comment.