# HG changeset patch # User Paul Boddie # Date 1512257031 -3600 # Node ID ffc8d17267a1c4180106cef33b0620b162994d61 # Parent a580c8ccae7346d0c9b7898c1ae6b4803d1acc20 Fixed missing queued results caused by start occurrence insertion. diff -r a580c8ccae73 -r ffc8d17267a1 vRecurrence.py --- a/vRecurrence.py Sat Dec 02 23:46:33 2017 +0100 +++ b/vRecurrence.py Sun Dec 03 00:23:51 2017 +0100 @@ -1430,11 +1430,25 @@ "Return the next value, initially the start period." while not self.at_limit(): - result = self.next_item(self.start, self.end) + + # Obtain the next item. + + try: + result = self.next_item(self.start, self.end) + except StopIteration: + + # With no more values, flush any waiting value. + + if self.waiting is not None: + result = self.waiting + self.waiting = None + return result + else: + raise # Compare with any waiting value. - if self.waiting: + if self.waiting is not None: # Produce the waiting value, queue the latest result.