From 188b97b1397ad9afbce8965edbf3930e01cfbe03 Mon Sep 17 00:00:00 2001 From: lucius-chen <18210678732@139.com> Date: Thu, 7 Jul 2022 10:35:45 +0800 Subject: [PATCH] =?UTF-8?q?F=20=E4=BF=AE=E5=A4=8D=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E4=B8=BB=E6=9C=BA=E6=97=B6=EF=BC=8C=E5=89=8D=E7=AB=AF=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E7=9A=84=E9=BB=98=E8=AE=A4=E5=AF=86=E7=A0=81=E4=B8=8D?= =?UTF-8?q?=E4=BC=9A=E8=A2=AB=E7=94=A8=E4=BA=8E=E6=9C=AA=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E4=B8=BB=E6=9C=BA=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_api/apps/host/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spug_api/apps/host/utils.py b/spug_api/apps/host/utils.py index cab03fe..f5af61d 100644 --- a/spug_api/apps/host/utils.py +++ b/spug_api/apps/host/utils.py @@ -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