[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. puppet-0.24.5-rc3-1601-gf8c1b08
James Turnbull
james at lovedthanlost.net
Fri Jan 15 09:07:30 UTC 2010
The following commit has been merged in the upstream branch:
commit 07b94b4687686acd4f1bc2567f7902e676c2338f
Author: Jesse Wolfe <jes5199 at gmail.com>
Date: Wed Nov 25 01:38:04 2009 -0800
2842 Format debugging should be removed
Replace this message that looks like an error
debug: Format s not supported for Puppet::FileServing::Metadata; has not implemented method 'from_s'
with
debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw yaml; using pson
Signed-off-by: Jesse Wolfe <jes5199 at gmail.com>
diff --git a/lib/puppet/network/format.rb b/lib/puppet/network/format.rb
index a5be3af..d781242 100644
--- a/lib/puppet/network/format.rb
+++ b/lib/puppet/network/format.rb
@@ -107,17 +107,7 @@ class Puppet::Network::Format
method = send(name)
- if type == :class
- has_method = klass.respond_to?(method)
- message = "has not implemented method '%s'" % method
- else
- has_method = klass.instance_methods.include?(method)
- message = "has not implemented instance method '%s'" % method
- end
-
- return true if has_method
-
- Puppet.debug "Format %s not supported for %s; %s" % [self.name, klass, message]
- return false
+ return klass.respond_to?(method) if type == :class
+ return klass.instance_methods.include?(method)
end
end
diff --git a/lib/puppet/network/format_handler.rb b/lib/puppet/network/format_handler.rb
index e508a02..544ba82 100644
--- a/lib/puppet/network/format_handler.rb
+++ b/lib/puppet/network/format_handler.rb
@@ -119,7 +119,11 @@ module Puppet::Network::FormatHandler
format_handler.format(b).weight <=> format_handler.format(a).weight
end
- put_preferred_format_first(result)
+ result = put_preferred_format_first(result)
+
+ Puppet.debug "#{indirection.name} supports formats: #{result.sort.join(' ')}; using #{result.first}"
+
+ result
end
private
@@ -130,7 +134,7 @@ module Puppet::Network::FormatHandler
list.delete(preferred_format)
list.unshift(preferred_format)
else
- Puppet.warning "Value of 'preferred_serialization_format' ('#{preferred_format}') is invalid, using default ('#{list.first}')"
+ Puppet.warning "Value of 'preferred_serialization_format' (#{preferred_format}) is invalid for #{indirection.name}, using default (#{list.first})"
end
list
end
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list