mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-05 02:16:39 +00:00
Safety check
This commit is contained in:
parent
b2b61e9452
commit
0f019bcf0e
1 changed files with 2 additions and 2 deletions
|
|
@ -23,7 +23,7 @@ function cache_utils.initialize()
|
|||
-- system
|
||||
local keys = ntop.getKeysCache(basename.."*.system")
|
||||
|
||||
for k,_ in pairs(keys) do
|
||||
for k,_ in pairs(keys or {}) do
|
||||
local system = json.decode(ntop.getCache(k))
|
||||
local ipaddr = string.sub(k, len+1, string.len(k)-7)
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ function cache_utils.initialize()
|
|||
-- interfaces
|
||||
keys = ntop.getKeysCache(basename.."*.interfaces")
|
||||
|
||||
for k,_ in pairs(keys) do
|
||||
for k,_ in pairs(keys or {}) do
|
||||
local ifaces = json.decode(ntop.getCache(k))
|
||||
local ipaddr = string.sub(k, len+1, string.len(k)-11)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue