mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Prevent exception when deleting a non-existent book.
This commit is contained in:
parent
805421573d
commit
748eb921c5
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user