[Jython-checkins] jython (2.5): Adding a documentation link to SSL exception messages
alan.kennedy
jython-checkins at python.org
Thu Mar 29 21:08:43 CEST 2012
http://hg.python.org/jython/rev/29a0cbeffdbd
changeset: 6497:29a0cbeffdbd
branch: 2.5
parent: 6443:9c21ad4e5818
user: Alan Kennedy <alan at xhaus.com>
date: Thu Mar 29 20:03:46 2012 +0100
summary:
Adding a documentation link to SSL exception messages
files:
Lib/socket.py | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/Lib/socket.py b/Lib/socket.py
--- a/Lib/socket.py
+++ b/Lib/socket.py
@@ -98,6 +98,8 @@
ALL = None
+_ssl_message = ": Differences between the SSL socket behaviour of cpython vs. jython are explained on the wiki: http://wiki.python.org/jython/NewSocketModule#SSL_Support"
+
_exception_map = {
# (<javaexception>, <circumstance>) : callable that raises the python equivalent exception, or None to stub out as unmapped
@@ -134,11 +136,11 @@
# These error codes are currently wrong: getting them correct is going to require
# some investigation. Cpython 2.6 introduced extensive SSL support.
-(javax.net.ssl.SSLException, ALL) : lambda x: sslerror(-1, 'SSL exception'),
-(javax.net.ssl.SSLHandshakeException, ALL) : lambda x: sslerror(-1, 'SSL handshake exception'),
-(javax.net.ssl.SSLKeyException, ALL) : lambda x: sslerror(-1, 'SSL key exception'),
-(javax.net.ssl.SSLPeerUnverifiedException, ALL) : lambda x: sslerror(-1, 'SSL peer unverified exception'),
-(javax.net.ssl.SSLProtocolException, ALL) : lambda x: sslerror(-1, 'SSL protocol exception'),
+(javax.net.ssl.SSLException, ALL) : lambda x: sslerror(-1, 'SSL exception'+_ssl_message),
+(javax.net.ssl.SSLHandshakeException, ALL) : lambda x: sslerror(-1, 'SSL handshake exception'+_ssl_message),
+(javax.net.ssl.SSLKeyException, ALL) : lambda x: sslerror(-1, 'SSL key exception'+_ssl_message),
+(javax.net.ssl.SSLPeerUnverifiedException, ALL) : lambda x: sslerror(-1, 'SSL peer unverified exception'+_ssl_message),
+(javax.net.ssl.SSLProtocolException, ALL) : lambda x: sslerror(-1, 'SSL protocol exception'+_ssl_message),
}
--
Repository URL: http://hg.python.org/jython
More information about the Jython-checkins
mailing list