[pypy-commit] pypy default: If the expected exception was raised, the SSLContext can't be shut down yet
stefanor
pypy.commits at gmail.com
Tue Sep 6 18:02:08 EDT 2016
Author: Stefano Rivera <stefano at 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()
More information about the pypy-commit
mailing list