From 61c170340264612a724371c02eea05774d7ff37b Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Mon, 22 Jul 2013 13:51:53 +0200 Subject: [PATCH] Remove broken code that does nothing useful --- src/calibre/devices/smart_device_app/driver.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/calibre/devices/smart_device_app/driver.py b/src/calibre/devices/smart_device_app/driver.py index 5fe60862e1..f8d679152d 100644 --- a/src/calibre/devices/smart_device_app/driver.py +++ b/src/calibre/devices/smart_device_app/driver.py @@ -140,21 +140,6 @@ class ConnectionListener(Thread): self.driver.listen_socket.settimeout(None) device_socket.settimeout(None) - try: - peer = self.driver.device_socket.getpeername()[0] - attempts = self.drjver.connection_attempts.get(peer, 0) - if attempts >= self.MAX_UNSUCCESSFUL_CONNECTS: - self.driver._debug('too many connection attempts from', peer) - device_socket.close() - device_socket = None -# raise InitialConnectionError(_('Too many connection attempts from %s') % peer) - else: - self.driver.connection_attempts[peer] = attempts + 1 - except InitialConnectionError: - raise - except: - pass - try: self.driver.connection_queue.put_nowait(device_socket) except Queue.Full: