Author: Stefano Rivera <stef...@rivera.za.net>
Branch: 
Changeset: r86915:0dcc383e61e3
Date: 2016-09-06 15:01 -0700
http://bitbucket.org/pypy/pypy/changeset/0dcc383e61e3/

Log:    If the expected exception was raised, the SSLContext can't be shut
        down yet

diff --git a/pypy/module/_ssl/test/test_ssl.py 
b/pypy/module/_ssl/test/test_ssl.py
--- a/pypy/module/_ssl/test/test_ssl.py
+++ b/pypy/module/_ssl/test/test_ssl.py
@@ -450,7 +450,12 @@
                 # For compatibility
                 assert exc.value.errno == _ssl.SSL_ERROR_WANT_READ
             finally:
-                c.shutdown()
+                try:
+                    c.shutdown()
+                except _ssl.SSLError:
+                    # If the expected exception was raised, the SSLContext
+                    # can't be shut down yet
+                    pass
         finally:
             s.close()
 
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to