[pypy-svn] pypy interplevel-exception-classes: Directly access the exception class defined in this module

amauryfa commits-noreply at bitbucket.org
Fri Feb 18 11:49:08 CET 2011


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: interplevel-exception-classes
Changeset: r42139:173118f7592b
Date: 2011-02-18 10:47 +0100
http://bitbucket.org/pypy/pypy/changeset/173118f7592b/

Log:	Directly access the exception class defined in this module

diff --git a/pypy/module/_ssl/interp_ssl.py b/pypy/module/_ssl/interp_ssl.py
--- a/pypy/module/_ssl/interp_ssl.py
+++ b/pypy/module/_ssl/interp_ssl.py
@@ -67,8 +67,7 @@
 constants["OPENSSL_VERSION"] = SSLEAY_VERSION
 
 def ssl_error(space, msg, errno=0):
-    w_module = space.getbuiltinmodule('_ssl')
-    w_exception_class = space.getattr(w_module, space.wrap('SSLError'))
+    w_exception_class = get_error(space)
     if errno:
         w_exception = space.call_function(w_exception_class,
                                           space.wrap(errno), space.wrap(msg))


More information about the Pypy-commit mailing list