* be on the safe side, tho' doesn't matter too much

This commit is contained in:
Eray Özkural
2006-05-24 22:55:58 +00:00
parent 486fd7e73b
commit 3a77958b78
+2 -1
View File
@@ -78,6 +78,7 @@ class InvertedIndex(object):
for term_i in terms: for term_i in terms:
term_i = shelve.LockedDBShelf.encodekey(term_i) term_i = shelve.LockedDBShelf.encodekey(term_i)
term_i_docs = self.get_term(term_i,repo=repo, txn=txn) term_i_docs = self.get_term(term_i,repo=repo, txn=txn)
term_i_docs.remove(doc) if doc in term_i_docs:
term_i_docs.remove(doc)
self.d.add_item(term_i, term_i_docs, repo=repo, txn=txn) # update self.d.add_item(term_i, term_i_docs, repo=repo, txn=txn) # update
return self.d.txn_proc(f, txn) return self.d.txn_proc(f, txn)