From e3a85eb872fbc2270dd9449048b1a90cf4279fb0 Mon Sep 17 00:00:00 2001 From: Mat Kelly Date: Tue, 3 Mar 2020 08:42:57 -0500 Subject: [PATCH] Break when iteration caused a non-match of the surt URI in the CDXJ re:#631 #604 --- ipwb/replay.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ipwb/replay.py b/ipwb/replay.py index 9738ef32..0ad3cd66 100755 --- a/ipwb/replay.py +++ b/ipwb/replay.py @@ -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()