mirror of https://github.com/aredn/aredn.git
Fix tonumber parsing when value is actually an error value (#580)
This commit is contained in:
parent
9ee849eb3f
commit
fa898ccb4f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue