From 53213fb494f04333d754a34ed0d0ce35c0114c4d Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Wed, 1 Aug 2012 20:36:28 +0200 Subject: [PATCH] Fix the fix --- src/calibre/devices/smart_device_app/driver.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/calibre/devices/smart_device_app/driver.py b/src/calibre/devices/smart_device_app/driver.py index 72a2ac471a..a235fbf028 100644 --- a/src/calibre/devices/smart_device_app/driver.py +++ b/src/calibre/devices/smart_device_app/driver.py @@ -455,10 +455,13 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin): # protocol, this can only be a disconnect notification. Fall # through and actually try to talk to the client. # This will usually toss an exception if the socket is gone. - if self._call_client('NOOP', dict())[0] is None: - self.is_connected = False except: + pass + try: + if self._call_client('NOOP', dict())[0] is None: self.is_connected = False + except: + self.is_connected = False if not self.is_connected: self.device_socket.close() return (self.is_connected, self)