Moving setting the LOAD_BALANCING_POLICY_MAP dictionary into the try except block that determines if the cassandra_cql module should be made available.

This commit is contained in:
Gareth J. Greenaway 2022-10-13 16:02:15 -07:00
parent 1404abe773
commit a3e56f4d60
No known key found for this signature in database
GPG key ID: 10B62F8A7CAD7A41
2 changed files with 18 additions and 17 deletions

1
changelog/62886.fixed Normal file
View file

@ -0,0 +1 @@
Moving setting the LOAD_BALANCING_POLICY_MAP dictionary into the try except block that determines if the cassandra_cql module should be made available.

View file

@ -136,9 +136,6 @@ try:
# pylint: enable=import-error,no-name-in-module
HAS_DRIVER = True
except ImportError:
pass
LOAD_BALANCING_POLICY_MAP = {
"HostDistance": HostDistance,
@ -156,6 +153,9 @@ LOAD_BALANCING_POLICY_MAP = {
"NoSpeculativeExecutionPolicy": NoSpeculativeExecutionPolicy,
}
except ImportError:
pass
def __virtual__():
"""