@@ -156,7 +156,7 @@ class RoutingConnectionPool(ConnectionPool):
156156
157157 call_get_servers = "CALL dbms.cluster.routing.getServers"
158158 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
160160
161161 def __init__ (self , connector , initial_address , routing_context , * routers ):
162162 super (RoutingConnectionPool , self ).__init__ (connector )
@@ -170,7 +170,7 @@ def routing_info_procedure(self, connection):
170170 if ServerVersion .from_str (connection .server .version ).at_least_version (3 , 2 ):
171171 return self .call_get_routing_table , {self .get_routing_table_param : self .routing_context }
172172 else :
173- return self .call_get_servers , None
173+ return self .call_get_servers
174174
175175 def fetch_routing_info (self , address ):
176176 """ Fetch raw routing info from a given router address.
@@ -315,8 +315,7 @@ def acquire(self, access_mode=None):
315315 self .remove (address )
316316 else :
317317 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 )
320319
321320 def remove (self , address ):
322321 """ Remove an address from the connection pool, if present, closing
0 commit comments