When auto converting books and the device is unplugged, do not raise an error. Fixes #8426 (Exception when attempting to send books to a Kindle that was sleeping)

This commit is contained in:
Kovid Goyal 2011-01-17 09:39:06 -07:00
parent 30922f75f2
commit 0d91ea7055

View File

@ -1018,7 +1018,8 @@ class DeviceMixin(object): # {{{
ids = [self.library_view.model().id(r) \
for r in self.library_view.selectionModel().selectedRows()] \
if send_ids is None else send_ids
if not self.device_manager or not ids or len(ids) == 0:
if not self.device_manager or not ids or len(ids) == 0 or \
not self.device_manager.is_device_connected:
return
settings = self.device_manager.device.settings()