mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Fix exception not being re-raised when deleting book fails
This commit is contained in:
parent
acaee61715
commit
d8967eae75
@ -5,7 +5,7 @@ __license__ = 'GPL v3'
|
||||
__copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
import errno
|
||||
import errno, os
|
||||
from functools import partial
|
||||
from collections import Counter
|
||||
|
||||
@ -379,12 +379,12 @@ class DeleteAction(InterfaceAction):
|
||||
except IOError as err:
|
||||
if err.errno == errno.EACCES:
|
||||
import traceback
|
||||
fname = getattr(err, 'filename', 'file') or 'file'
|
||||
fname = os.path.basename(getattr(err, 'filename', 'file') or 'file')
|
||||
return error_dialog(self.gui, _('Permission denied'),
|
||||
_('Could not access %s. Is it being used by another'
|
||||
' program? Click "Show details" for more information.')%fname, det_msg=traceback.format_exc(),
|
||||
show=True)
|
||||
|
||||
raise
|
||||
self.library_ids_deleted2(to_delete_ids, next_id=next_id)
|
||||
else:
|
||||
self.__md = MultiDeleter(self.gui, to_delete_ids,
|
||||
|
Loading…
x
Reference in New Issue
Block a user