From a0bc2b7da7c7738d00ff341199aef7cd8907267c Mon Sep 17 00:00:00 2001 From: xuyongliang_01 Date: Wed, 6 Sep 2023 01:19:53 +0000 Subject: [PATCH] =?UTF-8?q?update=20cve-agency-manager/cve=5Ftracking/core?= =?UTF-8?q?/crawler/patch.py.=20=E5=BD=93python=E7=89=88=E6=9C=AC=E4=BD=8E?= =?UTF-8?q?=E4=BA=8E3.7=E5=A6=823.6=E6=97=B6=EF=BC=8C=E9=9C=80=E8=B0=83?= =?UTF-8?q?=E7=94=A8asyncio.get=5Fevent=5Floop()=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=BA=8B=E4=BB=B6=E5=BE=AA=E7=8E=AFloop?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1=EF=BC=8C=E5=90=A6=E5=88=99=E4=BC=9A=E6=8A=A5?= =?UTF-8?q?AttributeError:=20module=20'asyncio'=20has=20no=20attribute=20'?= =?UTF-8?q?create=5Ftask'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xuyongliang_01 --- cve-agency-manager/cve_tracking/core/crawler/patch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cve-agency-manager/cve_tracking/core/crawler/patch.py b/cve-agency-manager/cve_tracking/core/crawler/patch.py index e24fb8a..5d98c23 100644 --- a/cve-agency-manager/cve_tracking/core/crawler/patch.py +++ b/cve-agency-manager/cve_tracking/core/crawler/patch.py @@ -117,7 +117,7 @@ class Patch: f"Start to obtain patches info of {self.cve_num} for {self.rpm_name}" ) crawler_task = [ - asyncio.create_task( + asyncio.get_event_loop().create_task( CvePlatform( platform=cve_platform, cve_num=self.cve_num, @@ -143,7 +143,7 @@ class Patch: """ task_list = [] for issue_or_pr in list(set(issue_pr_list)): - task_list.append(asyncio.create_task(method(issue_or_pr))) + task_list.append(asyncio.get_event_loop().create_task(method(issue_or_pr))) return task_list async def _get_issue_link_pr(self, issue): -- Gitee