From a3026462e59853bb776c5d85b3858fdc97778a84 Mon Sep 17 00:00:00 2001 From: MiyakoMeow <110924386+MiyakoMeow@users.noreply.github.com> Date: Mon, 3 Mar 2025 06:03:17 +0800 Subject: [PATCH] fix: not selecting --- fetch_ips.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fetch_ips.py b/fetch_ips.py index dc9cf5887..83e0fe9d6 100644 --- a/fetch_ips.py +++ b/fetch_ips.py @@ -38,7 +38,7 @@ def select_ip_from_list(ip_list: List[str]) -> Optional[str]: if len(ip_list) == 0: return None ping_results = [(ip, ping_cached(ip)) for ip in ip_list] - ping_results.sort(lambda x: x[1]) + ping_results.sort(key=lambda x: x[1]) best_ip = ping_results[0][0] print(f"{ping_results}, selected {best_ip}") return best_ip