[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. puppet-0.24.5-rc3-1601-gf8c1b08
Jesse Wolfe
jes5199 at gmail.com
Fri Jan 15 09:07:33 UTC 2010
The following commit has been merged in the upstream branch:
commit 623d9c75ae7b195c1668fe5fc9b18da14c4bdb97
Author: Jesse Wolfe <jes5199 at gmail.com>
Date: Thu Dec 3 14:46:28 2009 -0800
Fixing 2886: Failing specs in format_handler
Clean up warning messages so that they don't fail when run inside the
test class.
Signed-off-by: Jesse Wolfe <jes5199 at gmail.com>
diff --git a/lib/puppet/network/format_handler.rb b/lib/puppet/network/format_handler.rb
index 544ba82..ea8cf35 100644
--- a/lib/puppet/network/format_handler.rb
+++ b/lib/puppet/network/format_handler.rb
@@ -121,20 +121,28 @@ module Puppet::Network::FormatHandler
result = put_preferred_format_first(result)
- Puppet.debug "#{indirection.name} supports formats: #{result.sort.join(' ')}; using #{result.first}"
+ Puppet.debug "#{friendly_name} supports formats: #{result.map{ |f| f.to_s }.sort.join(' ')}; using #{result.first}"
result
end
private
+ def friendly_name
+ if self.respond_to? :indirection
+ indirection.name
+ else
+ self
+ end
+ end
+
def put_preferred_format_first(list)
preferred_format = Puppet.settings[:preferred_serialization_format].to_sym
if list.include?(preferred_format)
list.delete(preferred_format)
list.unshift(preferred_format)
else
- Puppet.warning "Value of 'preferred_serialization_format' (#{preferred_format}) is invalid for #{indirection.name}, using default (#{list.first})"
+ Puppet.warning "Value of 'preferred_serialization_format' (#{preferred_format}) is invalid for #{friendly_name}, using default (#{list.first})"
end
list
end
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list