diff options
| author | Luke Kanies <luke@madstop.com> | 2008-07-04 22:14:37 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-07-04 22:14:37 -0500 |
| commit | b0febd263c0cb8e61d512898f7c79868ea77e619 (patch) | |
| tree | 3f35c4b2d7186d3c69c070c9edc684ccdc51f658 /lib/puppet/util | |
| parent | df528a66cafc8538c3208bf0b52fdbe1065f6e48 (diff) | |
| parent | 81be1c5c3f85f514505e99fab5b8a2b2ae6fbec8 (diff) | |
Merge branch '0.24.x'
Conflicts:
lib/puppet/util/settings.rb
spec/integration/defaults.rb
spec/unit/node/catalog.rb
spec/unit/type/interface.rb
spec/unit/type/ssh_authorized_key.rb
Diffstat (limited to 'lib/puppet/util')
| -rw-r--r-- | lib/puppet/util/ldap/connection.rb | 1 | ||||
| -rw-r--r-- | lib/puppet/util/settings.rb | 11 |
2 files changed, 4 insertions, 8 deletions
diff --git a/lib/puppet/util/ldap/connection.rb b/lib/puppet/util/ldap/connection.rb index 861539872..f6530f853 100644 --- a/lib/puppet/util/ldap/connection.rb +++ b/lib/puppet/util/ldap/connection.rb @@ -63,7 +63,6 @@ class Puppet::Util::Ldap::Connection @connection.set_option(LDAP::LDAP_OPT_REFERRALS, LDAP::LDAP_OPT_ON) @connection.simple_bind(user, password) rescue => detail - puts detail.class raise Puppet::Error, "Could not connect to LDAP: %s" % detail end end diff --git a/lib/puppet/util/settings.rb b/lib/puppet/util/settings.rb index aeda88e09..b6855dfa5 100644 --- a/lib/puppet/util/settings.rb +++ b/lib/puppet/util/settings.rb @@ -644,13 +644,10 @@ Generated on #{Time.now}. begin catalog.host_config = false catalog.apply do |transaction| - if failures = transaction.any_failed? - # LAK:NOTE We should do something like this for some cases, - # since it can otherwise be hard to know what failed. - #transaction.report.logs.find_all { |log| log.level == :err }.each do |log| - # puts log.message - #end - raise "Could not configure myself; got %s failure(s)" % failures + if transaction.any_failed? + report = transaction.report + failures = report.logs.find_all { |log| log.level == :err } + raise "Got %s failure(s) while initializing: %s" % [failures.length, failures.collect { |l| l.to_s }.join("; ")] end end end |
