summaryrefslogtreecommitdiff
path: root/files/master
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-12-06 19:44:25 +0100
committermh <mh@immerda.ch>2010-12-06 19:44:25 +0100
commitf45cb83e525f85234c13f7903cfcd533e0fc8e6e (patch)
tree94c778d6ad08ba4c08c19cbba884a987220112ea /files/master
parent28933190dccf19c54b9533cc22980e4094cb3465 (diff)
looks like last_compile can be nil sometimes
Diffstat (limited to 'files/master')
-rw-r--r--files/master/lastruncheck4
1 files changed, 2 insertions, 2 deletions
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