diff --git a/cassandra/policies.py b/cassandra/policies.py index 633b7ffd..fab6d8c6 100644 --- a/cassandra/policies.py +++ b/cassandra/policies.py @@ -26,7 +26,7 @@ class RoundRobinPolicy(LoadBalancingPolicy): def populate(self, cluster, hosts): self._live_hosts = set(hosts) - if len(hosts) == 1: + if len(hosts) <= 1: self._position = 0 else: self._position = randint(0, len(hosts) - 1)