Commit c21cf4cd by Stéphane Graber

lua: fix crash on missing blkio

Closes: #403 Signed-off-by: Dwight Engen Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 896003e2
...@@ -271,6 +271,10 @@ function container:stat_match_get_int(item, match, column) ...@@ -271,6 +271,10 @@ function container:stat_match_get_int(item, match, column)
local val local val
local lines = self:get_cgroup_item(item) local lines = self:get_cgroup_item(item)
if (lines == nil) then
return 0
end
for line in lines:gmatch("[^\r\n]+") do for line in lines:gmatch("[^\r\n]+") do
if (string.find(line, match)) then if (string.find(line, match)) then
local col local col
......
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