Skip to content

Commit

Permalink
Fix whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
sylwiaszunejko committed Oct 1, 2024
1 parent c7e740c commit 197e99c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cassandra/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ def default_retry_policy(self, policy):
cloud = None
"""
A dict of the cloud configuration. Example::
{
# path to the secure connect bundle
'secure_connect_bundle': '/path/to/secure-connect-dbname.zip',
Expand Down Expand Up @@ -1768,7 +1768,7 @@ def connect(self, keyspace=None, wait_for_all_pools=False):
self.contact_points, self.protocol_version)
self.connection_class.initialize_reactor()
_register_cluster_shutdown(self)

self._add_resolved_hosts()

try:
Expand Down Expand Up @@ -3616,7 +3616,7 @@ def _set_new_connection(self, conn):
if old:
log.debug("[control connection] Closing old connection %r, replacing with %r", old, conn)
old.close()

def _connect_host_in_lbp(self):
errors = {}
lbp = (
Expand All @@ -3637,7 +3637,7 @@ def _connect_host_in_lbp(self):
log.warning("[control connection] Error connecting to %s:", host, exc_info=True)
if self._is_shutdown:
raise DriverException("[control connection] Reconnection in progress during shutdown")

return (None, errors)

def _reconnect_internal(self):
Expand All @@ -3652,7 +3652,7 @@ def _reconnect_internal(self):
(conn, _) = self._connect_host_in_lbp()
if conn is not None:
return conn

# Try to re-resolve hostnames as a fallback when all hosts are unreachable
self._cluster._resolve_hostnames()

Expand All @@ -3661,7 +3661,7 @@ def _reconnect_internal(self):
(conn, errors) = self._connect_host_in_lbp()
if conn is not None:
return conn

raise NoHostAvailable("Unable to connect to any servers", errors)

def _try_connect(self, host):
Expand Down Expand Up @@ -3697,7 +3697,7 @@ def _try_connect(self, host):
# If sharding information is available, it's a ScyllaDB cluster, so do not use peers_v2 table.
if connection.features.sharding_info is not None:
self._uses_peers_v2 = False

self._tablets_routing_v1 = connection.features.tablets_routing_v1

# use weak references in both directions
Expand Down

0 comments on commit 197e99c

Please sign in to comment.