From c33d5e4a686ccb8482c73ae290455a987b4f32e7 Mon Sep 17 00:00:00 2001 From: luke Date: Fri, 26 Jan 2007 21:45:02 +0000 Subject: Using Time instead of Time.to_i for compile time, because some versions of ruby have trouble converting Bignum to yaml git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2093 980ebf18-57e1-0310-9a29-db15c13687c0 --- lib/puppet/client/master.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/puppet/client/master.rb b/lib/puppet/client/master.rb index e7bbe538e..65bdbf19a 100644 --- a/lib/puppet/client/master.rb +++ b/lib/puppet/client/master.rb @@ -195,7 +195,7 @@ class Puppet::Client::MasterClient < Puppet::Client end # We're willing to give a 2 second drift - if @driver.freshness - @compile_time < 1 + if @driver.freshness - @compile_time.to_i < 1 return true else return false @@ -549,7 +549,7 @@ class Puppet::Client::MasterClient < Puppet::Client # If we're local, we don't have to do any of the conversion # stuff. objects = @driver.getconfig(facts, "yaml") - @compile_time = Time.now.to_i + @compile_time = Time.now if objects == "" raise Puppet::Error, "Could not retrieve configuration" @@ -590,8 +590,7 @@ class Puppet::Client::MasterClient < Puppet::Client Puppet.warning "Could not get config; using cached copy" fromcache = true else - @compile_time = Time.now.to_i - Puppet.warning "Caching compile time %s" % @compile_time.inspect + @compile_time = Time.now Puppet::Storage.cache(:configuration)[:compile_time] = @compile_time end -- cgit