Fix tonumber parsing when value is actually an error value (#580)

This commit is contained in:
Tim Wilkinson 2022-12-23 21:01:07 -08:00 committed by GitHub
parent 9ee849eb3f
commit fa898ccb4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -292,7 +292,8 @@ print([[}]])
-- add the ACTIVE tunnel interfaces
if #tunnels > 0 then
local tun_weight = tonumber(cursor:get("aredn", "@tunnel[0]", "weight"))
local tun_weight = cursor:get("aredn", "@tunnel[0]", "weight")
tun_weight = tonumber(tun_weight)
local tuns = ""
for _, tunnel in ipairs(tunnels)
do