mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #7491 (Error after subscribing to TidBITS: Mac News... news source)
This commit is contained in:
parent
247723eaca
commit
f40f555d13
@ -1014,7 +1014,13 @@ class DeviceMixin(object): # {{{
|
||||
self.status_bar.show_message(_('Sent by email:') + ', '.join(good),
|
||||
5000)
|
||||
if remove:
|
||||
try:
|
||||
self.library_view.model().delete_books_by_id(remove)
|
||||
except:
|
||||
# Probably the user deleted the files, in any case, failing
|
||||
# to delete the book is not catastrophic
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
def cover_to_thumbnail(self, data):
|
||||
ht = self.device_manager.device.THUMBNAIL_HEIGHT \
|
||||
|
@ -625,7 +625,11 @@ class ResultCache(SearchQueryParser): # {{{
|
||||
# }}}
|
||||
|
||||
def remove(self, id):
|
||||
try:
|
||||
self._data[id] = None
|
||||
except IndexError:
|
||||
# id is out of bounds, no point setting it to None anyway
|
||||
pass
|
||||
try:
|
||||
self._map.remove(id)
|
||||
except ValueError:
|
||||
|
Loading…
x
Reference in New Issue
Block a user