diff options
Diffstat (limited to 'lib/puppet/parser/functions')
-rw-r--r-- | lib/puppet/parser/functions/file.rb | 2 | ||||
-rw-r--r-- | lib/puppet/parser/functions/include.rb | 2 | ||||
-rw-r--r-- | lib/puppet/parser/functions/inline_template.rb | 2 | ||||
-rw-r--r-- | lib/puppet/parser/functions/require.rb | 2 | ||||
-rw-r--r-- | lib/puppet/parser/functions/split.rb | 2 | ||||
-rw-r--r-- | lib/puppet/parser/functions/template.rb | 4 |
6 files changed, 7 insertions, 7 deletions
diff --git a/lib/puppet/parser/functions/file.rb b/lib/puppet/parser/functions/file.rb index f78823d3a..d13b01ede 100644 --- a/lib/puppet/parser/functions/file.rb +++ b/lib/puppet/parser/functions/file.rb @@ -18,6 +18,6 @@ if ret ret else - raise Puppet::ParseError, "Could not find any files from %s" % vals.join(", ") + raise Puppet::ParseError, "Could not find any files from #{vals.join(", ")}" end end diff --git a/lib/puppet/parser/functions/include.rb b/lib/puppet/parser/functions/include.rb index 213a04136..a8b6f175b 100644 --- a/lib/puppet/parser/functions/include.rb +++ b/lib/puppet/parser/functions/include.rb @@ -19,7 +19,7 @@ Puppet::Parser::Functions::newfunction(:include, :doc => "Evaluate one or more c str += " " + missing.join(", ") if n = namespaces and ! n.empty? and n != [""] - str += " in namespaces %s" % @namespaces.join(", ") + str += " in namespaces #{@namespaces.join(", ")}" end self.fail Puppet::ParseError, str end diff --git a/lib/puppet/parser/functions/inline_template.rb b/lib/puppet/parser/functions/inline_template.rb index fde8006b4..6c0485d1e 100644 --- a/lib/puppet/parser/functions/inline_template.rb +++ b/lib/puppet/parser/functions/inline_template.rb @@ -14,7 +14,7 @@ Puppet::Parser::Functions::newfunction(:inline_template, :type => :rvalue, :doc wrapper.result(string) rescue => detail raise Puppet::ParseError, - "Failed to parse inline template: %s" % [detail] + "Failed to parse inline template: #{detail}" end end.join("") end diff --git a/lib/puppet/parser/functions/require.rb b/lib/puppet/parser/functions/require.rb index 45b89c77a..c5c4c851f 100644 --- a/lib/puppet/parser/functions/require.rb +++ b/lib/puppet/parser/functions/require.rb @@ -43,7 +43,7 @@ fail if used with earlier clients. if classobj = find_hostclass(klass) klass = classobj.name else - raise Puppet::ParseError, "Could not find class %s" % klass + raise Puppet::ParseError, "Could not find class #{klass}" end # This is a bit hackish, in some ways, but it's the only way diff --git a/lib/puppet/parser/functions/split.rb b/lib/puppet/parser/functions/split.rb index 405a5bc9a..c3466ba4a 100644 --- a/lib/puppet/parser/functions/split.rb +++ b/lib/puppet/parser/functions/split.rb @@ -23,7 +23,7 @@ way to do that for a single character is to enclose it in square brackets.") do |args| if args.length != 2 - raise Puppet::ParseError, ("split(): wrong number of arguments" + " (#{args.length}; must be 2)") + raise Puppet::ParseError, ("split(): wrong number of arguments (#{args.length}; must be 2)") end return args[0].split(Regexp.compile(args[1])) diff --git a/lib/puppet/parser/functions/template.rb b/lib/puppet/parser/functions/template.rb index 35c54c66a..6c4873efe 100644 --- a/lib/puppet/parser/functions/template.rb +++ b/lib/puppet/parser/functions/template.rb @@ -8,7 +8,7 @@ Puppet::Parser::Functions::newfunction(:template, :type => :rvalue, :doc => vals.collect do |file| # Use a wrapper, so the template can't get access to the full # Scope object. - debug "Retrieving template %s" % file + debug "Retrieving template #{file}" wrapper = Puppet::Parser::TemplateWrapper.new(self) wrapper.file = file @@ -16,7 +16,7 @@ Puppet::Parser::Functions::newfunction(:template, :type => :rvalue, :doc => wrapper.result rescue => detail raise Puppet::ParseError, - "Failed to parse template %s: %s" % [file, detail] + "Failed to parse template #{file}: #{detail}" end end.join("") end |