]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lua: fix crash on missing blkio
authorStéphane Graber <stgraber@ubuntu.com>
Mon, 26 Jan 2015 05:11:55 +0000 (00:11 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 30 Jan 2015 09:04:54 +0000 (10:04 +0100)
Closes: #403
Signed-off-by: Dwight Engen
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lua-lxc/lxc.lua

index 44e4bf11ed3330e67956dc9c9b2a51f33d2e90a0..72a1531a807c875680c596b90d42217c0dde8fa1 100755 (executable)
@@ -271,6 +271,10 @@ function container:stat_match_get_int(item, match, column)
     local val
     local lines = self:get_cgroup_item(item)
 
+    if (lines == nil) then
+       return 0
+    end
+
     for line in lines:gmatch("[^\r\n]+") do
        if (string.find(line, match)) then
            local col