diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-01-26 21:45:02 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-01-26 21:45:02 +0000 |
commit | c33d5e4a686ccb8482c73ae290455a987b4f32e7 (patch) | |
tree | 7c7ae92266937e689e33285e13cde2273e53a03f | |
parent | 6d791f511962c26c3e6d8eb2c7bdc7db687fe762 (diff) | |
download | puppet-c33d5e4a686ccb8482c73ae290455a987b4f32e7.tar.gz puppet-c33d5e4a686ccb8482c73ae290455a987b4f32e7.tar.xz puppet-c33d5e4a686ccb8482c73ae290455a987b4f32e7.zip |
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
-rw-r--r-- | lib/puppet/client/master.rb | 7 |
1 files 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 |