Permalink
Browse files

Name ensure_db_num better

  • Loading branch information...
1 parent b9df87a commit 00f9e8df8d1415f8033ba1ed70afffdc4f4676d7 John Watson committed Apr 6, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 nydus/db/routers/base.py
@@ -117,7 +117,7 @@ def __init__(self, *args, **kwargs):
super(RoundRobinRouter,self).__init__(*args, **kwargs)
@classmethod
- def verify_db_num(cls, db_num):
+ def ensure_db_num(cls, db_num):
try:
return int(db_num)
except ValueError:
@@ -128,11 +128,11 @@ def flush_down_connections(self):
self._down_connections = {}
def mark_connection_down(self, db_num):
- db_num = self.verify_db_num(db_num)
+ db_num = self.ensure_db_num(db_num)
self._down_connections[db_num] = time.time()
def mark_connection_up(self, db_num):
- db_num = self.verify_db_num(db_num)
+ db_num = self.ensure_db_num(db_num)
self._down_connections.pop(db_num, None)
def _setup_router(self, cluster, *args, **kwargs):

0 comments on commit 00f9e8d

Please sign in to comment.