From 0d91ea7055c24b98b9117517abf669cae3f6f53a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 17 Jan 2011 09:39:06 -0700 Subject: [PATCH] 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) --- src/calibre/gui2/device.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/device.py b/src/calibre/gui2/device.py index 944ce03305..734d8cd56c 100644 --- a/src/calibre/gui2/device.py +++ b/src/calibre/gui2/device.py @@ -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()