Fixed ARP matrix

Added check for reporting dump errors
This commit is contained in:
Luca Deri 2019-12-23 15:48:54 +01:00
parent a8d7353a07
commit f1cb0e3511
3 changed files with 6 additions and 4 deletions

View file

@ -45,14 +45,16 @@ function prefs_dump_utils.savePrefsToDisk()
end
end
end
local json = require("dkjson")
local dump = json.encode(out, nil, 1)
local file = io.open(where, "w")
local file,err = io.open(where, "w")
if(file ~= nil) then
file:write(dump)
file:close()
else
print("[ERROR] Unable to write file "..where..": "..err.."\n")
end
end