From f45cb83e525f85234c13f7903cfcd533e0fc8e6e Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 6 Dec 2010 19:44:25 +0100 Subject: looks like last_compile can be nil sometimes --- files/master/lastruncheck | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'files/master') diff --git a/files/master/lastruncheck b/files/master/lastruncheck index e0a3c47..79ccfeb 100644 --- a/files/master/lastruncheck +++ b/files/master/lastruncheck @@ -96,8 +96,8 @@ module Puppet::Lastcheck::Tests::Storedconfigs storedconfigs_hosts.each do |host| if !facts_hosts.any?{|fact_host| fact_host[:hostname] == host.name } add_failed_host(host.name, "In storedconfigs but no facts available!") - elsif host.last_compile < (Time.now - @timeout) - add_failed_host(host.name, "Last update in storedconfigs at #{host.updated_at}") + elsif host.last_compile.nil? || host.last_compile < (Time.now - @timeout) + add_failed_host(host.name, "Last compile time in storedconfigs at #{host.last_compile}") end end end -- cgit v1.2.3