summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierce Lopez <pierce.lopez@gmail.com>2017-02-22 18:49:39 -0500
committerPierce Lopez <pierce.lopez@gmail.com>2017-02-23 15:57:04 -0500
commit65bdd6ef746856b52e4c14d8cc0b93ecf4b1c755 (patch)
tree43e32dd0512d79313abaa70c810be1cd340b01bd
parentcb4fc8c9483efc51b5384a64dc79e6aba1a2eab0 (diff)
downloadparamiko-65bdd6ef746856b52e4c14d8cc0b93ecf4b1c755.tar.gz
transport: remove compat for old python lacking sock.settimeout()
-rw-r--r--paramiko/transport.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/paramiko/transport.py b/paramiko/transport.py
index 8bf582cc..73757909 100644
--- a/paramiko/transport.py
+++ b/paramiko/transport.py
@@ -313,14 +313,9 @@ class Transport (threading.Thread, ClosingContextManager):
threading.Thread.__init__(self)
self.setDaemon(True)
self.sock = sock
- # Python < 2.3 doesn't have the settimeout method - RogerB
- try:
- # we set the timeout so we can check self.active periodically to
- # see if we should bail. socket.timeout exception is never
- # propagated.
- self.sock.settimeout(self._active_check_timeout)
- except AttributeError:
- pass
+ # we set the timeout so we can check self.active periodically to
+ # see if we should bail. socket.timeout exception is never propagated.
+ self.sock.settimeout(self._active_check_timeout)
# negotiated crypto parameters
self.packetizer = Packetizer(sock)