Avoid TokenAware failure when keyspace not set
PYTHON-181; fixes KeyError when routing_key set with no keyspace
This commit is contained in:
@@ -359,7 +359,7 @@ class TokenAwarePolicy(LoadBalancingPolicy):
|
|||||||
yield host
|
yield host
|
||||||
else:
|
else:
|
||||||
routing_key = query.routing_key
|
routing_key = query.routing_key
|
||||||
if routing_key is None:
|
if routing_key is None or keyspace is None:
|
||||||
for host in child.make_query_plan(keyspace, query):
|
for host in child.make_query_plan(keyspace, query):
|
||||||
yield host
|
yield host
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user