Kaydet (Commit) 969fbe3d authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Don't crash when the _ssl module isn't built

üst 33e5935b
......@@ -60,7 +60,11 @@ class BasicTests(unittest.TestCase):
def skip_if_broken_ubuntu_ssl(func):
# We need to access the lower-level wrapper in order to create an
# implicit SSL context without trying to connect or listen.
import _ssl
try:
import _ssl
except ImportError:
# The returned function won't get executed, just ignore the error
pass
@functools.wraps(func)
def f(*args, **kwargs):
try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment