mirror of https://github.com/lcpz/lain.git
Merge pull request #279 from renatofdds/patch-1
Fix regression in net.lua widget
This commit is contained in:
commit
e64c1443d0
|
@ -32,7 +32,8 @@ local function worker(args)
|
||||||
local settings = args.settings or function() end
|
local settings = args.settings or function() end
|
||||||
|
|
||||||
-- Compatibility with old API where iface was a string corresponding to 1 interface
|
-- Compatibility with old API where iface was a string corresponding to 1 interface
|
||||||
net.iface = (args.iface and type(args.iface) == "string" and {args.iface}) or {}
|
net.iface = (args.iface and (type(args.iface) == "string" and {args.iface}) or (type(args.iface) == "table" and args.iface)) or {}
|
||||||
|
|
||||||
|
|
||||||
function net.get_device()
|
function net.get_device()
|
||||||
helpers.async(string.format("ip link show", device_cmd), function(ws)
|
helpers.async(string.format("ip link show", device_cmd), function(ws)
|
||||||
|
|
Loading…
Reference in New Issue