Project

General

Profile

« Previous | Next » 

Revision d964a005

Added by Clemens Bergmann about 10 years ago

non string parameters allowed

View differences:

lib/puppet/parser/functions/random_password.rb
# Numbers in Puppet are often string-encoded which is troublesome ...
if size.is_a?(String) and size.match(/^\d+$/)
size = size.to_i
else
end
if !size.is_a?(Numeric) || size < 0
raise Puppet::ParseError, 'random_password(): Requires a non-negative ' +
'integer value to work with'
end

Also available in: Unified diff