[Jython-checkins] jython (merge 2.5 -> default): merge w/2.5: Mapping java.net.NoRouteToHostException. Fixes #1908. Thanks to
alan.kennedy
jython-checkins at python.org
Fri Jun 8 23:00:52 CEST 2012
http://hg.python.org/jython/rev/cd15a0e2cb15
changeset: 6694:cd15a0e2cb15
parent: 6692:8bf7e0d6133c
parent: 6693:68c9cd730297
user: Alan Kennedy <alan at xhaus.com>
date: Fri Jun 08 21:57:00 2012 +0100
summary:
merge w/2.5: Mapping java.net.NoRouteToHostException. Fixes #1908. Thanks to Roderick Colenbrander for the patch.
files:
Lib/socket.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Lib/socket.py b/Lib/socket.py
--- a/Lib/socket.py
+++ b/Lib/socket.py
@@ -115,7 +115,7 @@
(java.net.BindException, ALL) : lambda x: error(errno.EADDRINUSE, 'Address already in use'),
(java.net.ConnectException, ALL) : lambda x: error(errno.ECONNREFUSED, 'Connection refused'),
-(java.net.NoRouteToHostException, ALL) : None,
+(java.net.NoRouteToHostException, ALL) : lambda x: error(errno.EHOSTUNREACH, 'No route to host'),
(java.net.PortUnreachableException, ALL) : None,
(java.net.ProtocolException, ALL) : None,
(java.net.SocketException, ALL) : java_net_socketexception_handler,
--
Repository URL: http://hg.python.org/jython
More information about the Jython-checkins
mailing list