4
This commit is contained in:
@@ -30,6 +30,7 @@ try:
|
||||
api_login_flow,
|
||||
is_api_mode_available,
|
||||
get_verification_code_api,
|
||||
ShutdownRequested,
|
||||
)
|
||||
API_MODE_AVAILABLE = is_api_mode_available()
|
||||
except ImportError:
|
||||
@@ -37,6 +38,7 @@ except ImportError:
|
||||
ChatGPTAPIRegister = None
|
||||
api_register_flow = None
|
||||
api_login_flow = None
|
||||
ShutdownRequested = Exception # 回退到基础异常类
|
||||
|
||||
# ================= 配置加载 =================
|
||||
try:
|
||||
@@ -2432,6 +2434,9 @@ def run_single_registration_api(progress_callback=None, step_callback=None, prox
|
||||
log_status("失败", "注册成功但支付/获取token失败")
|
||||
return {"success": False, "error": "支付流程失败", "account": email, "password": password}
|
||||
|
||||
except ShutdownRequested:
|
||||
log_status("停止", "[!] 用户请求停止")
|
||||
return {"success": False, "error": "用户停止", "stopped": True, "account": email, "password": password}
|
||||
except Exception as e:
|
||||
error_msg = str(e)
|
||||
# 只有连接断开才认为是停止请求
|
||||
|
||||
Reference in New Issue
Block a user