Developing lightweight computation at the DSG edge

Commit 617efdc7 authored by p4u's avatar p4u
Browse files

Fixed web interface bug: when no txpower wireless tab crash

parent 3d63d726
......@@ -71,7 +71,7 @@ function qmpinfo.get_txpower(dev)
local iw = iwinfo[iwinfo.type(dev)]
local txpower_supported = {}
if iw ~= nil then
local txp = iw.txpwrlist(dev)
local txp = iw.txpwrlist(dev) or {}
for _,v in ipairs(txp) do
table.insert(txpower_supported,v.dbm)
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment