Sha256: 2b12ad2978947410c343855c83711f5d8b119bff85e3edee9915514c6575f03a
Contents?: true
Size: 797 Bytes
Versions: 2
Compression:
Stored size: 797 Bytes
Contents
module Puppet::Util::ConfigTimeout # NOTE: in the future it might be a good idea to add an explicit "integer" type to # the settings types, in which case this would no longer be necessary. # Get the value of puppet's "configtimeout" setting, as an integer. Raise an # ArgumentError if the setting does not contain a valid integer value. # @return Puppet config timeout setting value, as an integer def timeout_interval timeout = Puppet[:configtimeout] case timeout when String if timeout =~ /^\d+$/ timeout = Integer(timeout) else raise ArgumentError, "Configuration timeout must be an integer" end when Integer # nothing else raise ArgumentError, "Configuration timeout must be an integer" end timeout end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
puppet-3.0.0.rc5 | lib/puppet/util/config_timeout.rb |
puppet-3.0.0.rc4 | lib/puppet/util/config_timeout.rb |