Prevent exception when deleting a non-existent book.

This commit is contained in:
Charles Haley 2013-07-27 10:32:49 +02:00
parent 805421573d
commit 748eb921c5

View File

@ -920,7 +920,8 @@ class ResultCache(SearchQueryParser): # {{{
def remove(self, id):
try:
self._uuid_map.pop(self._data[id][self._uuid_column_index], None)
if self._data[id] is not None:
self._uuid_map.pop(self._data[id][self._uuid_column_index], None)
except IndexError:
pass # id is out of bounds -- no uuid in the map to remove
try: