From 7a3323118e64064f788942c0303bf90e22c87676 Mon Sep 17 00:00:00 2001 From: Robey Pointer Date: Thu, 8 Apr 2004 05:12:20 +0000 Subject: [PATCH] [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-47] add socket.timeout for py22 oops, forgot this vital part of the py22 patches. roger binns sent me a code patch that included this snip. --- paramiko/common.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/paramiko/common.py b/paramiko/common.py index 88e8b1a..c9d5558 100644 --- a/paramiko/common.py +++ b/paramiko/common.py @@ -68,6 +68,12 @@ if sys.version_info < (2, 3): import logging22 as logging import select PY22 = True + + import socket + if not hasattr(socket, 'timeout'): + class timeout(socket.error): pass + socket.timeout = timeout + del timeout else: import logging PY22 = False