@@ -156,7 +156,7 @@ class RoutingConnectionPool(ConnectionPool):
156
156
157
157
call_get_servers = "CALL dbms.cluster.routing.getServers"
158
158
get_routing_table_param = "context"
159
- call_get_routing_table = "CALL dbms.cluster.routing.getRoutingTable({" + get_routing_table_param + "})"
159
+ call_get_routing_table = "CALL dbms.cluster.routing.getRoutingTable({%s})" % get_routing_table_param
160
160
161
161
def __init__ (self , connector , initial_address , routing_context , * routers ):
162
162
super (RoutingConnectionPool , self ).__init__ (connector )
@@ -170,7 +170,7 @@ def routing_info_procedure(self, connection):
170
170
if ServerVersion .from_str (connection .server .version ).at_least_version (3 , 2 ):
171
171
return self .call_get_routing_table , {self .get_routing_table_param : self .routing_context }
172
172
else :
173
- return self .call_get_servers , None
173
+ return self .call_get_servers
174
174
175
175
def fetch_routing_info (self , address ):
176
176
""" Fetch raw routing info from a given router address.
@@ -315,8 +315,7 @@ def acquire(self, access_mode=None):
315
315
self .remove (address )
316
316
else :
317
317
return connection
318
- raise SessionExpired ("Failed to obtain connection towards '" + access_mode +
319
- "' server. Known routing table is: '" + self .routing_table + "'." )
318
+ raise SessionExpired ("Failed to obtain connection towards '%s' server." % access_mode )
320
319
321
320
def remove (self , address ):
322
321
""" Remove an address from the connection pool, if present, closing
0 commit comments