From 640a67fc3a977942090e82185a94fc4b6f4ed756 Mon Sep 17 00:00:00 2001 From: InfinityPacer <160988576+InfinityPacer@users.noreply.github.com> Date: Fri, 27 Sep 2024 04:12:22 +0800 Subject: [PATCH] fix(module): resolve infinite recursion in get_instance method --- app/modules/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/modules/__init__.py b/app/modules/__init__.py index 0dc26334..3a54d817 100644 --- a/app/modules/__init__.py +++ b/app/modules/__init__.py @@ -206,7 +206,7 @@ class _DownloaderBase(ServiceBase[TService, DownloaderConf]): :return: 返回指定名称的实例,若 name 为 None 则返回默认实例 """ if name: - return self.get_instance(name) + return self._instances.get(name) return self._default_server def get_configs(self) -> List[DownloaderConf]: