修正:运维授权策略中同时加入远程账号和该账号所在的主机、或所在的组,使得远程账号授权在同一个策略中重复,导致无法远程(后续查询时有重复就报错了)。

pull/105/head
Apex Liu 2018-05-09 21:40:02 +08:00
parent 7d56d74ae4
commit 544a94e637
1 changed files with 4 additions and 4 deletions

View File

@ -18,8 +18,8 @@ def get_by_id(pid):
if err != TPE_OK:
return err, {}
if len(s.recorder) == 0:
return TPE_NOT_EXISTS, {}
# if len(s.recorder) == 0:
# return TPE_NOT_EXISTS, {}
return TPE_OK, s.recorder[0]
@ -475,8 +475,8 @@ def get_auth(auth_id):
if len(s.recorder) == 0:
return None, TPE_NOT_EXISTS
if len(s.recorder) != 1:
return None, TPE_FAILED
# if len(s.recorder) != 1:
# return None, TPE_FAILED
# log.v(s.recorder[0])
return s.recorder[0], TPE_OK