From 01207e054aa8a02787731b96e682045a0b01d660 Mon Sep 17 00:00:00 2001 From: Denis Knauf Date: Fri, 29 Nov 2024 22:21:19 +0100 Subject: [PATCH] pkgcache.bin - check path before stat --- lib/lxc_collector.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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