perf: 优化smart匹配数据库端口数量失败时的错误提示信息

pull/8980/head
Jiangjie.Bai 2022-10-20 17:37:25 +08:00
parent cdcfdeefc5
commit 104dd9721b
1 changed files with 4 additions and 4 deletions

View File

@ -56,10 +56,10 @@ class DBPortManager(object):
self.set_mapper(mapper) self.set_mapper(mapper)
def get_port_by_db(self, db): def get_port_by_db(self, db):
# mapper = self.get_mapper() mapper = self.get_mapper()
# for port, db_id in mapper.items(): for port, db_id in mapper.items():
# if db_id == str(db.id): if db_id == str(db.id):
# return port return port
error = _( error = _(
'No available port is matched. ' 'No available port is matched. '
'The number of databases may have exceeded the number of ports ' 'The number of databases may have exceeded the number of ports '