summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/base_events.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@dropbox.com>2013-11-01 21:22:30 (GMT)
committerGuido van Rossum <guido@dropbox.com>2013-11-01 21:22:30 (GMT)
commit28dff0d8238aa8f34e7858209e598f1db8bfbf70 (patch)
tree94ccbc396c7c320e0b130f077d92603fce976029 /Lib/asyncio/base_events.py
parenta8d630a6e6190a4873a16a6a8c02f561e1e1c7fe (diff)
downloadcpython-28dff0d8238aa8f34e7858209e598f1db8bfbf70.zip
cpython-28dff0d8238aa8f34e7858209e598f1db8bfbf70.tar.gz
cpython-28dff0d8238aa8f34e7858209e598f1db8bfbf70.tar.bz2
asyncio: Better-looking errors when ssl module cannot be imported. In part by Arnaud Faure.
Diffstat (limited to 'Lib/asyncio/base_events.py')
-rw-r--r--Lib/asyncio/base_events.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py
index a73b3d3..f2d117b 100644
--- a/Lib/asyncio/base_events.py
+++ b/Lib/asyncio/base_events.py
@@ -466,6 +466,8 @@ class BaseEventLoop(events.AbstractEventLoop):
ssl=None,
reuse_address=None):
"""XXX"""
+ if isinstance(ssl, bool):
+ raise TypeError('ssl argument must be an SSLContext or None')
if host is not None or port is not None:
if sock is not None:
raise ValueError(