diff --git a/lib/lxc_collector.rb b/lib/lxc_collector.rb index e8dac70..c7c374b 100755 --- a/lib/lxc_collector.rb +++ b/lib/lxc_collector.rb @@ -98,7 +98,7 @@ class LxcCollector end wr.write [:pkgs, { id: ct.name, name: name, upgradable: upgradable, - last_update: AptLastUpdateFile.stat.mtime.to_f, + last_update: AptLastUpdateFile.exist? ? AptLastUpdateFile.stat.mtime.to_f : -1, }] end end