reject None in contact_points

This commit is contained in:
Adam Holmberg
2016-04-06 15:34:07 -05:00
parent e00b150ad7
commit cdfb03e7b7

View File

@@ -529,6 +529,8 @@ class Cluster(object):
if isinstance(contact_points, six.string_types):
raise TypeError("contact_points should not be a string, it should be a sequence (e.g. list) of strings")
if None in contact_points:
raise ValueError("contact_points should not contain None (it can resolve to localhost)")
self.contact_points = contact_points
self.port = port