From 59877dd728bc71b30099acd74c706a43e3cd770c Mon Sep 17 00:00:00 2001 From: kainstan Date: Tue, 6 Jun 2023 08:41:55 +0800 Subject: [PATCH] Local variable 'result' might be referenced before assignment, add else result --- check_proxy.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/check_proxy.py b/check_proxy.py index 977802db..eacf2c66 100644 --- a/check_proxy.py +++ b/check_proxy.py @@ -12,6 +12,8 @@ def check_proxy(proxies): result = f"代理配置 {proxies_https}, 代理所在地:{country}" elif 'error' in data: result = f"代理配置 {proxies_https}, 代理所在地:未知,IP查询频率受限" + else: + result = f"代理配置 {proxies_https}, 代理数据解析失败:{data}" print(result) return result except: