mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-31 13:14:31 +01:00
Fix #7491 (Error after subscribing to TidBITS: Mac News... news source)
This commit is contained in:
parent
247723eaca
commit
f40f555d13
2 changed files with 12 additions and 2 deletions
|
|
@ -1014,7 +1014,13 @@ def emails_sent(self, results, remove=[]):
|
|||
self.status_bar.show_message(_('Sent by email:') + ', '.join(good),
|
||||
5000)
|
||||
if remove:
|
||||
self.library_view.model().delete_books_by_id(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 @@ def set_search_restriction(self, s):
|
|||
# }}}
|
||||
|
||||
def remove(self, id):
|
||||
self._data[id] = None
|
||||
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…
Reference in a new issue