[Python-checkins] r83739 - python/branches/release27-maint/Lib/test/test_ssl.py
antoine.pitrou
python-checkins at python.org
Thu Aug 5 03:30:23 CEST 2010
Author: antoine.pitrou
Date: Thu Aug 5 03:30:23 2010
New Revision: 83739
Log:
Don't crash when the _ssl module isn't built
Modified:
python/branches/release27-maint/Lib/test/test_ssl.py
Modified: python/branches/release27-maint/Lib/test/test_ssl.py
==============================================================================
--- python/branches/release27-maint/Lib/test/test_ssl.py (original)
+++ python/branches/release27-maint/Lib/test/test_ssl.py Thu Aug 5 03:30:23 2010
@@ -60,7 +60,11 @@
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:
More information about the Python-checkins
mailing list