2222)
2323from tarantool .error import (
2424 ClusterConnectWarning ,
25- PoolTolopogyError ,
26- PoolTolopogyWarning ,
25+ PoolTopologyError ,
26+ PoolTopologyWarning ,
2727 ConfigurationError ,
2828 DatabaseError ,
2929 NetworkError ,
@@ -295,14 +295,14 @@ def _getnext_by_mode(self, *iters, err_msg="Can't find healthy instance in pool"
295295
296296 :rtype: :class:`~tarantool.connection_pool.PoolUnit`
297297
298- :raise: :exc:`~tarantool.error.PoolTolopogyError `
298+ :raise: :exc:`~tarantool.error.PoolTopologyError `
299299
300300 :meta private:
301301 """
302302 for itr in iters :
303303 if itr is not None :
304304 return next (itr )
305- raise PoolTolopogyError (err_msg )
305+ raise PoolTopologyError (err_msg )
306306
307307 def getnext (self , mode ):
308308 """
@@ -313,7 +313,7 @@ def getnext(self, mode):
313313
314314 :rtype: :class:`~tarantool.connection_pool.PoolUnit`
315315
316- :raise: :exc:`~tarantool.error.PoolTolopogyError `
316+ :raise: :exc:`~tarantool.error.PoolTopologyError `
317317 """
318318
319319 if self .rebuild_needed :
@@ -579,28 +579,28 @@ def _get_new_state(self, unit):
579579 except DatabaseError as exc :
580580 msg = (f"Failed to get box.info for { unit .get_address ()} , "
581581 f"reason: { repr (exc )} " )
582- warn (msg , PoolTolopogyWarning )
582+ warn (msg , PoolTopologyWarning )
583583 return InstanceState (Status .UNHEALTHY )
584584
585585 try :
586586 read_only = resp .data [0 ]['ro' ]
587587 except (IndexError , KeyError ) as exc :
588588 msg = (f"Incorrect box.info response from { unit .get_address ()} "
589589 f"reason: { repr (exc )} " )
590- warn (msg , PoolTolopogyWarning )
590+ warn (msg , PoolTopologyWarning )
591591 return InstanceState (Status .UNHEALTHY )
592592
593593 try :
594594 status = resp .data [0 ]['status' ]
595595
596596 if status != 'running' :
597597 msg = f"{ unit .get_address ()} instance status is not 'running'"
598- warn (msg , PoolTolopogyWarning )
598+ warn (msg , PoolTopologyWarning )
599599 return InstanceState (Status .UNHEALTHY )
600600 except (IndexError , KeyError ) as exc :
601601 msg = (f"Incorrect box.info response from { unit .get_address ()} "
602602 f"reason: { repr (exc )} " )
603- warn (msg , PoolTolopogyWarning )
603+ warn (msg , PoolTopologyWarning )
604604 return InstanceState (Status .UNHEALTHY )
605605
606606 return InstanceState (Status .HEALTHY , read_only )
0 commit comments