We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1a9eaca + 02065de commit c3cf384Copy full SHA for c3cf384
cassandra/datastax/cloud/__init__.py
@@ -18,7 +18,13 @@
18
import tempfile
19
import shutil
20
from six.moves.urllib.request import urlopen
21
-from ssl import SSLContext, PROTOCOL_TLSv1, CERT_REQUIRED
+
22
+_HAS_SSL = True
23
+try:
24
+ from ssl import SSLContext, PROTOCOL_TLSv1, CERT_REQUIRED
25
+except:
26
+ _HAS_SSL = False
27
28
from zipfile import ZipFile
29
30
# 2.7 vs 3.x
@@ -70,6 +76,9 @@ def from_dict(cls, d):
70
76
71
77
72
78
def get_cloud_config(cloud_config):
79
+ if not _HAS_SSL:
80
+ raise DriverException("A Python installation with SSL is required to connect to a cloud cluster.")
81
73
82
if 'secure_connect_bundle' not in cloud_config:
74
83
raise ValueError("The cloud config doesn't have a secure_connect_bundle specified.")
75
84
0 commit comments