From cdfb03e7b72e05b1ce6a7998436fb23fa1e2b692 Mon Sep 17 00:00:00 2001 From: Adam Holmberg Date: Wed, 6 Apr 2016 15:34:07 -0500 Subject: [PATCH] reject None in contact_points --- cassandra/cluster.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cassandra/cluster.py b/cassandra/cluster.py index c1773267..ef76ffca 100644 --- a/cassandra/cluster.py +++ b/cassandra/cluster.py @@ -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