F 修复验证主机时,前端输入的默认密码不会被用于未验证主机。

pull/517/head
lucius-chen 2022-07-07 10:35:45 +08:00
parent 7872d8cb85
commit 188b97b139
1 changed files with 1 additions and 1 deletions

View File

@ -255,7 +255,7 @@ def batch_sync_host(token, hosts, password=None):
max_workers = max(10, os.cpu_count() * 5)
with futures.ThreadPoolExecutor(max_workers=max_workers) as executor:
for host in hosts:
if hasattr(host, 'password'):
if getattr(host, 'password'):
password = host.password
t = executor.submit(_sync_host_extend, host, private_key, public_key, password)
t.host = host