From 13069eca1a3e2b08f5201462021d83e2e0a81018 Mon Sep 17 00:00:00 2001 From: Daniel Pittman Date: Tue, 29 Jul 2008 15:52:23 +1000 Subject: Ensure that we consistently use either string #{} interpolation or String.% interpolation, not both, to avoid issues where a #{} interpolated value contains a % character. Signed-off-by: Daniel Pittman --- lib/puppet/network/client/master.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/puppet/network') diff --git a/lib/puppet/network/client/master.rb b/lib/puppet/network/client/master.rb index 2da6cf890..6f8e2770f 100644 --- a/lib/puppet/network/client/master.rb +++ b/lib/puppet/network/client/master.rb @@ -338,7 +338,7 @@ class Puppet::Network::Client::Master < Puppet::Network::Client if Puppet[:debug] puts detail.backtrace end - Puppet.err "Could not retrieve #{args[:name]}s: %s" % detail + Puppet.err "Could not retrieve %ss: %s" % [args[:name], detail] end # Now clean up after ourselves @@ -389,12 +389,13 @@ class Puppet::Network::Client::Master < Puppet::Network::Client Dir.entries(dir).find_all { |e| e =~ /\.rb$/ }.each do |file| fqfile = ::File.join(dir, file) begin - Puppet.info "Loading #{type} %s" % ::File.basename(file.sub(".rb",'')) + Puppet.info "Loading %s %s" % + [type, ::File.basename(file.sub(".rb",''))] Timeout::timeout(self.timeout) do load fqfile end rescue => detail - Puppet.warning "Could not load #{type} %s: %s" % [fqfile, detail] + Puppet.warning "Could not load %s %s: %s" % [type, fqfile, detail] end end end -- cgit