Commits

Matt Chaput committed d9368c8

Fixed IndexError if remove() left the list empty. See issue #356.

  • Participants
  • Parent commits 646a065

Comments (0)

Files changed (1)

src/whoosh/collectors.py

                 items.pop(i)
                 # Restore the heap invariant
                 heapify(items)
-                self.minscore = items[0][0]
+                self.minscore = items[0][0] if items else 0
                 return
 
         # The document wasn't on the list... somebody's confused!