mirror of
https://github.com/CCLeonOS/LeonOS.git
synced 2026-03-03 06:47:00 +00:00
fix(updater): 为HTTP错误添加默认提示信息
当HTTP请求失败时,如果错误信息为空则显示"Unknown HTTP error",避免用户看到空提示
This commit is contained in:
@@ -79,7 +79,7 @@ local function dl(f)
|
||||
until evt[1] == "http_success" or evt[1] == "http_failure"
|
||||
|
||||
if evt[1] == "http_failure" then
|
||||
term.at(1, h).write(evt[3])
|
||||
term.at(1, h).write(evt[3] or "Unknown HTTP error")
|
||||
|
||||
local id = os.startTimer(5)
|
||||
repeat local _,i = coroutine.yield() until i == id
|
||||
|
||||
Reference in New Issue
Block a user