From 00b2ce3e2e5389a1af3acd1ce8cbba42504b660c Mon Sep 17 00:00:00 2001 From: clowwindy Date: Sat, 12 May 2012 00:56:42 +0800 Subject: [PATCH] fix socket.error problem --- local.py | 2 +- server.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/local.py b/local.py index 4c60191..84155d5 100755 --- a/local.py +++ b/local.py @@ -54,7 +54,7 @@ def socket_create_connection(address, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, sock.connect(sa) return sock - except error as _: + except socket.error as _: err = _ if sock is not None: sock.close() diff --git a/server.py b/server.py index 97487e9..698e61b 100755 --- a/server.py +++ b/server.py @@ -57,7 +57,7 @@ def socket_create_connection(address, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, sock.connect(sa) return sock - except error as _: + except socket.error as _: err = _ if sock is not None: sock.close()