修复:
- 更新检查跳过(节点未配置)时 _latest_version 未初始化,_on_update_done 读取触发 AttributeError;改为检查开始前统一初始化
This commit is contained in:
@@ -1605,6 +1605,9 @@ class MainWindow(QWidget):
|
|||||||
self.traffic_total.setText(_fmt_bytes(up_total + down_total))
|
self.traffic_total.setText(_fmt_bytes(up_total + down_total))
|
||||||
def _check_update(self):
|
def _check_update(self):
|
||||||
"""后台检查服务器是否有新版本。"""
|
"""后台检查服务器是否有新版本。"""
|
||||||
|
# 先初始化结果,任何路径(含跳过)完成后 _on_update_done 都能安全读取
|
||||||
|
self._latest_version = ""
|
||||||
|
self._download_url = ""
|
||||||
try:
|
try:
|
||||||
import json, urllib.request, base64
|
import json, urllib.request, base64
|
||||||
domain = _endpoint_domain()
|
domain = _endpoint_domain()
|
||||||
|
|||||||
Reference in New Issue
Block a user